ImageGear Professional > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multi Page Image Functions > IG_mpi_page_is_valid |
This function returns information about the page with a given index.
Copy Code
|
|
---|---|
AT_BOOL ACCUAPI IG_mpi_page_is_valid( [IN] HMIGEAR hMIGear, [IN] UINT nPage, ); |
Name | Type | Description |
hMIGear | HMIGEAR | The handle to the allocated multi-page image. |
nPage | UINT | The index of the page to check. |
Returns TRUE if the given page is valid.
All pixel formats supported by ImageGear Professional.
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 ); |
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.