Available in LEADTOOLS Imaging Pro, Vector, Document, and Medical Imaging toolkits. |
LMemoryFile::GetInfo
#include "ltwrappr.h"
virtual L_INT LMemoryFile::GetInfo(LMemoryBuffer, pFileInfo, uStructSize, uFlags=FILEINFO_TOTALPAGES, pLoadFileOption=NULL)
LBuffer& LMemoryBuffer; |
/* an LBuffer object */ |
pFILEINFO pFileInfo; |
/* pointer to a LEAD FILEINFO structure */ |
L_UINT uStructSize; |
/* size in bytes, of the structure pointed to by pFileInfo */ |
L_UINT uFlags; |
/* flag that indicates whether to update the TotalPages field */ |
pLOADFILEOPTION pLoadFileOption; |
/* pointer to optional extended load options */ |
Loads information about the file located in memory into a FILEINFO structure
Parameter |
Description |
|
LMemoryBuffer |
A LEAD LBuffer object that holds the memory of the image file. |
|
pFileInfo |
Pointer to the LEAD FILEINFO structure to be filled with data from the image file. You must set the uStructSize member of pFileInfo before calling LMemoryFile::GetInfo. |
|
uStructSize |
Size in bytes, of the structure pointed to by pFileInfo. Use sizeof(FILEINFO). |
|
uFlags |
Flag that indicates whether to update the TotalPages field in the FILEINFO structure. Possible values are: |
|
|
Value |
Meaning |
|
FILEINFO_TOTALPAGES |
[0x0001] Update the pFileInfo->TotalPages field with the total number of pages in the file. |
|
0 |
Do not update the pFileInfo->TotalPages field. |
pLoadFileOption |
Pointer to optional extended load options. Pass NULL to use the default load options. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
To use this function, do the following:
1. |
Declare a variable with the datatype of FILEINFO. |
2. |
Load the file into memory and assign variables for the file's location in memory and for the file size. |
3. |
If you are getting information about a multi-page file (which can contain more than one image), use the LOADFILEOPTION structure to specify the page number. The information that you get will be for the image on the specified page. |
4. |
Call the LMemoryFile::GetInfo function, passing the file name and the address of the FILEINFO variable as parameters. When calling the function, use the sizeof macro to pass the size of the FILEINFO structure in the uStructSize parameter. |
5. |
Get the image information from the fields described in FILEINFO structure. |
For a summary of file information functions, refer to Getting and Setting File Information.
Note: More options are available in the LOADFILEOPTION structure.
Note:This function does not support Kodak PhotoCD (PCD) files or Kodak FlashPix files.
The LMemoryBuffer parameter is passed by reference, and is a required parameter.
Required DLLs and Libraries
LTFIL For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Win32, x64.
See Also
Functions: |
|
Topics: |
|
|
Example
For an example, refer to LMemoryFile::LoadMemory.