This function returns information about the page with a given index.
Declaration:
|
Copy Code
|
AT_BOOL ACCUAPI IG_mpi_page_is_valid(
[IN] HMIGEAR hMIGear,
[IN] UINT nPage,
);
|
Arguments:
Name |
Type |
Description |
hMIGear |
HMIGEAR |
The handle to the allocated multi-page image. |
nPage |
UINT |
The index of the page to check. |
Return Value:
Returns TRUE if the given page is valid.
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; /* will hold returned error count */
UINT nPageCount = IGE_SUCCESS; /* number of pages that should get from multi-page image */
UINT i;
HIGEAR hIGear; /* handle of an image */
...
/* initialize of multi-page image and assign it with external file */
nErrCount = IG_mpi_page_count_get( hMIGear, &nPageCount );
for ( i = 0; i < nPageCount; i++ )
if ( !IG_mpi_page_is_valid(hMIGear, i) && (!nErrCount) )
nErrCount = IG_mpi_page_unload( hMIGear, i, 1 );
|
Remarks:
If the page with such an index exists as well as a valid HIGEAR handle, then it returns TRUE. In all other cases FALSE is returned.