#include "ltwrappr.h"

virtual L_INT LFile::GetInfo(pFileInfo, uStructSize, uFlags=FILEINFO_TOTALPAGES, pLoadFileOption=NULL)

pFILEINFO pFileInfo;

pointer to a FILEINFO structure to be filled

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 in the FILEINFO structure


pointer to optional extended load options

Gets information about the specified file and fills the specified FILEINFO structure with the information.

Parameter Description
pFileInfo Pointer to the FILEINFO structure to be filled. For more information, refer to FILEINFO.

NOTE: Uninitialized pFileInfo should not pass to this function.

uStructSize Size in bytes, of the structure pointed to by pFileInfo. Use sizeof(FILEINFO).
uFlags Flag indicating which members to update in the FILEINFO structure, if any. The FILEINFO_TOTALPAGES and FILEINFO_USEFILTERDATA values can be OR-ed together, in which case both values are retrieved. Possible values are:
Value Meaning
FILEINFO_TOTALPAGES [0x0001] Update the pFileInfo->TotalPages field with the total number of pages in the file.
FILEINFO_USEFILTERDATA [0x0002] Use filter data information to speed up loading.
0 Do not update the pFileInfo->TotalPages field.
pLoadFileOption Pointer to optional extended load options. Pass NULL to use the default load options.



The function was successful.

< 1

An error occurred. Refer to Return Codes.


To use this function, do the following:


Declare a variable with the datatype of FILEINFO.


Declare and assign a character string variable for the file name.


If you are getting information about a multipage 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.


Set the filename by calling LFile::SetFileName.


Initialize the FILEINFO structure to zero values.


Call the LFile::GetInfo function, passing the address of the FILEINFO variable as parameters.


Get the image information from the fields described in FILEINFO structure.

The parallelogram values retrieved by LFile::GetInfo may not be always correct because it depends on the file saved data. The function does not load file objects but reads the file dimensions which may be not saved within the file.

For a summary of file information functions, refer to Getting and Setting File Information.

Note: More options are available in the LOADFILEOPTION structure.

Note: For information on loading and saving large TIFF files faster, refer to Loading and Saving Large TIFF/BigTIFF Files.

Note: For information about loading and saving PDF files, refer to Implementing PDF Features.

Note: You should never pass an uninitialized FILEINFO structure to this function.

Required DLLs and Libraries

File format DLLs

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.

Help Version 20.0.2020.2.17
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C++ Class Library Help