ImageGear for C and C++ on Linux v20.0 - Updated
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Info Functions > IG_info_get_ex

This function obtains information about the specified file page, without loading the pixel data.


Copy Code
   const LPSTR lpszFileName,
   UINT nPageNumber,
   LPAT_MODE lpFileType,
   LPAT_MODE lpCompression,


Name Type Description
lpszFileName const LPSTR Path and name of the file to get the information about. The path can be absolute or relative.
nPageNumber UINT Page number to get info about if this is a multi-page (multi-image) file. Note that page numbers begin at 1, not 0. Set nPageNumber to 1, if this is not a multi-page file.
lpFileType LPAT_MODE Pointer to an AT_MODE variable in which the file type will be returned. See enumIGFormats for possible values.
lpCompression LPAT_MODE Pointer to an AT_MODE variable in which compression type will be returned. See enumIGCompressions for possible values.
lphDIB HIGDIBINFO* Pointer to an HIGDIBINFO structure to which additional file information such as width, height, and Bits Per Pixel, will be returned.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.


Copy Code
AT_MODE nFileType;        // Will receive an IG_FORMAT_ constant
AT_MODE nCompression;    // Will receive an IG_COMPRESSION_ constant
AT_ERRCOUNT nErrcount;        // Returned count of errors
nErrcount = IG_info_get_ex("picture.bmp", 1, &nFileType, &nCompression, &hDIB);

// ...
// Delete DIB info


Any of the output parameters such as lpFileType, lpCompression or lphDIB can be NULL, if the corresponding info is not required.

See also the section Loading and Saving.

This function is identical to IG_fltr_pageinfo_get_ex.

Is this page helpful?
Yes No
Thanks for your feedback.