ImageGear for C and C++ on Windows v19.8 - Updated
IG_mpf_info_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multi Page Image File Functions > IG_mpf_info_get

If a multi-page image hMIGear is associated with the external file image, then this function returns the file format type of the external image through a second parameter, lpFileType.

Declaration:

 
Copy Code
AT_ERRCOUNT IG_mpf_info_get( 
        [IN]  HMIGEAR hMIGear, 
        [OUT] LPAT_MODE lpFileType, 
);

Arguments:

Name Type Description
hMIGear HMIGEAR Handle to allocated a multi-page image.
lpFileType LPAT_MODE Far pointer indicating where to receive file types such as IG_FORMAT_TIF, or IG_FORMAT_MODCA. For a complete list of format types, see the accucnst.h file.

Return Value:

Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.

Supported Raster Image Formats:

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

Sample:

MFC Multipage

Example:

 
Copy Code
HMIGEAR  hMIGear;  /* handle to multi-page image */
AT_ERRCOUNT      nErrCount = IGE_SUCCESS;  /* will hold returned error count  */
AT_MODE         nFileType;
 ...
/* initialize multi-page image and assign it with external file */
        iErrCnt = IG_mpf_info_get( hMIGear, &nFileType );
        if (!iErrCnt)
        printf("File type:%i\n", (INT)nFileType);

Remarks:

This constant is from the format constant list, which is defined in the accucnst.h include file. If it is not associated with the file, then this function returns an error.