FILEINFO

The FILEINFO structure, which is loaded by the LFile::GetInfo function, provides information about the specified file.

Note: The LTFIL.H header file describes the entire FILEINFO structure.

Member Data Type Description
Format L_INT File format. For possible values, refer to Files To Be Included With Your Application.
Name[_MAX_FNAME+_MAX_EXT] L_TCHAR A character array containing the null-terminated string that is the file name. The name is truncated if it exceeds _MAX_FNAME + _MAX_EXT characters.
Width L_INT Image width, in pixels.
Height L_INT Image height, in pixels.
BitsPerPixel L_INT Bits per pixel.
SizeDisk L_INT32 Size of the file on disk (in bytes).
SizeMem L_INT32 Amount of memory (in bytes) required to load the file.
Compression[20] L_TCHAR A 20-character array containing the null-terminated string that describes the compression method.
ViewPerspective L_INT Where the beginning of the image is stored. Valid values are TOP_LEFT, BOTTOM_LEFT, TOP_RIGHT, BOTTOM_RIGHT, TOP_LEFT90, and TOP_LEFT270. For descriptions, refer to Accounting for View Perspective.
Order L_INT Color order of the bitmap. This field is meaningful if the image does not have a palette. It indicates whether the color values are in red-green-blue or blue-green-red order. Possible values are ORDER_RGB, ORDER_BGR and ORDER_GRAY.
PageNumber L_INT The page number in a multipage file. To determine the total number of pages in a file, call LFile::GetInfo with uFlags set to FILEINFO_TOTALPAGES.
TotalPages L_INT The total number of pages present in a file. To update this field, call LFile::GetInfo with uFlags set to FILEINFO_TOTALPAGES. If you do not want this field updated, call LFile::GetInfo with uFlags set to 0.
XResolution L_INT Horizontal resolution, in dots per inch. Some file formats save this value in the file header.
YResolution L_INT Vertical resolution, in dots per inch. Some file formats save this value in the file header.
Flags L_INT32 For possible values, refer to FILEINFO Flags.
GlobalLoop L_UINT Global animation loop count. 0 = infinity. This field is valid only if the FILEINFO_HAS_GLOBALLOOP flag is set.
GlobalWidth L_INT Global width for animation playback
GlobalHeight L_INT Global height for animation playback
GlobalBackground COLORREF Global background color for animation playback (FILEINFO Flags)
GlobalPalette[256] RGBQUAD Global palette for animation playback (FILEINFO Flags).
IFD L_UINT32 Offset within a TIFF file where a page starts. This member is updated when Lfile::GetInfo is called.
Layers L_INT Number of layers in the file. If this value is 0, then the file does not contain any layers. Only PSD files can have layers.
ColorSpace L_INT Color space of the file. Possible values are:
    Value Meaning
    COLORSPACE_BGR [0] Color space is RGB or BGR
    COLORSPACE_YUV [1] Color space is YUV or YCbCr
    COLORSPACE_CMYK [2] Color space is CMYK
    COLORSPACE_CIELAB [3] Color space is CIELab
Channels L_INT Number of channles in the file.  If this value is 0, then the file does not contain channels.  Only PSD files can have channels.
bIsDocFile L_BOOL TRUE if the image file or stream is a document format, FALSE otherwise.

When the value of this member is TRUE, then the image file or stream passed to the L_FileInfo is a document file such as PDF or XPS and dDocPageWidth, dDocPageHeight and uDocUnit will contain the original document logical size. The physical load (rasterization size) is calculated based on the current rasterization values and is stored in Width, Height, XResolution and YResolution.

When the value of this member is FALSE, then the image file or stream is a raster image such as JPEG or TIFF. These files have physical size and dDocPageWidth, dDocPageHeight and uDocUnit should not be used.

dDocPageWidth L_DOUBLE The logical width of the document. This value is in uDocUnit.

The logical width and height of the document is the original size before rasterization. LEADTOOLS usually returns the logical size in inches.

dDocPageWidth should only be used if the value of bIsDocFile is TRUE.

dDocPageHeight L_DOUBLE The logical width and height of the document is the original size before rasterization. LEADTOOLS usually returns the logical size in inches.

dDocPageHeight should only be used if the value of bIsDocFile is TRUE.

uDocUnit RASTERIZEDOC_UNIT The unit for dDocPageWidth and dDocPageHeight. It can be one of the following values:
    Value Meaning
    RASTERIZEDOC_UNIT_PIXEL [0] Page width and height is in pixels.
    RASTERIZEDOC_UNIT_INCH [1] Page width and height is in inches.
    RASTERIZEDOC_UNIT_MILLIMETER [2] Page width and height is in millimeters.
MessageCount L_INT Total number of messages for PST files only.
nHorzTiles L_INT Number of horizontal tiles.
nVertTiles L_INT Number of vertical tiles.

Comments

pFILEINFO is a pointer to a FILEINFO structure. Where the function parameter type is pFILEINFO, you can declare a FILEINFO variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pFILEINFO variable is necessary only if your program requires a pointer.

NOTE: Uninitialized FILEINFO should not pass to LFile::GetInfo or LMemoryFile::GetInfo function.

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

Please note that if FILEINFO.Format is FILE_JPEG or FILE_TIF_JPEG and FILEINFO.BitsPerPixel is 8, then the image is 4:0:0 color space, not 4:4:4 color space.

Currently only PSD files support layers.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C++ Class Library Help