If multi-page image hMIGear is associated with an external file, then this function returns information about the page with an nPage index from the external file.
Declaration:
|
Copy Code
|
AT_ERRCOUNT ACCUAPI IG_mpf_page_info_get_ex(
HMIGEAR hMIGear,
UINT nPage,
LPAT_MODE lpCompression,
HIGDIBINFO* lpDIB
);
|
Arguments:
Name |
Type |
Description |
hMIGear |
HMIGEAR |
Handle to allocated multi-page image. |
nPage |
UINT |
Index of the page, starting with 0. |
lpCompression |
AT_MODE |
Pointer indicating where to receive the compression method of the given image. It is used for constants such as IG_COMPRESSION_NONE, or IG_COMPRESSION_JPEG. A complete list of compression methods can be found in the accucnst.h file. |
lpDIB |
HIGDIBINFO* |
Pointer indicating where to return a DIB info handle associated with the page. |
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:
None
Example:
|
Copy Code
|
HMIGEAR hMIGear; /* handle to multi-page image */
AT_ERRCOUNT nErrCount; /* will hold returned error count */
UINT nPageCount = 0;
UINT i;
AT_MODE nCompression;
HIGDIBINFO hDIB;
char str[80];
...
/* initialize multi-page image, assign it with external file */
nErrCount = IG_mpf_page_count_get( hMIGear, &nPageCount );
for( i = 0; i < nPageCount; i++)
if (!nErrCnt)
{
nErrCnt = IG_mpf_page_info_get_ex( hMIGear, i, &nCompression, &hDIB );
if (!nErrCnt)
{
IG_guidlg_compression_name_get( nCompression, str, sizeof(str) );
printf( "Page %i\n Compression method: %s\n", i, str );
}
}
|
Remarks:
Pages are numbered starting with 0. If the image is not associated with an external file, then this function returns an error.