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

This function obtains information about the specified file without loading the pixel data. This is an obsolete function, see remarks.


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


Name Type Description
lpszFileName const LPSTR Name of file about which to get information.
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.
lpDIB LPAT_DIB Pointer to an AT_DIB 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:

If lpDIB is not NULL, then

otherwise, 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_DIB dibInfoDIB;        // Will receive copy of the    BITMAPINFOHEADER
AT_ERRCOUNT nErrcount;    // Returned count of errors
nErrcount = IG_info_get("picture.bmp", &nFileType, &nCompression, &dibInfoDIB);


This function is only kept for backward compatibility reasons. Please use IG_info_get_ex instead.

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

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