ImageGear Professional v18.2 > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multi Page Image File Functions > IG_mpf_page_info_get |
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.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_mpf_info_get( [IN] HMIGEAR hMIGear, [IN] UINT nPage, [OUT] LPAT_MODE lpCompression, [OUT] LPAT_DIB lpDib ); |
Name | Type | Description |
hMIGear | HMIGEAR | The handle to allocated the multi-page image. |
nPage | UINT | Index of the page, starting with 0. |
lpCompression | LPAT_MODE | Far 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 | LPAT_DIB | The far pointer indicating where to return a DIB associated with the page. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
Indexed RGB – 1, 4, 8 bpp;
Grayscale – 9…16 bpp;
RGB – 24 bpp;
CMYK – 32 bpp.
This function is only kept for backward compatibility reasons. Please use IG_mpf_page_info_get_ex instead. |
MFC Multipage
Copy Code
|
|
---|---|
HMIGEAR hMIGear; /* handle to multi-page image */ AT_ERRCOUNT nErrCount = IGE_SUCCESS; /* will hold returned error count */ UINT nPageCount = 0; UINT i; AT_MODE nCompression; AT_DIB Dib; char str[80]; ... /* initialize multi-page image and 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( hMIGear, i, &nCompression, &Dib ); if (!nErrCnt) { IG_guidlg_compression_name_get( nCompression, str, sizeof(str) ); printf( "Page %i\n Compression method: %s\n", i, str ); } } |
Pages are numbered starting with 0. If the image is not associated with an external file, then this functions returns an error.