ImageGear for C and C++ on Windows v19.6 - Updated
IG_info_get
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.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_info_get(
   const LPSTR lpszFileName,
   LPAT_MODE lpFileType,
   LPAT_MODE lpCompression,
   LPAT_DIB lpDIB
);

Arguments:

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++.

Sample:

Filters, Processing, Paledit, Vector

Example:

 
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);

Remarks:

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.