ImageGear Professional > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multi Page Image File Functions > IG_mpf_page_delete |
This function deletes the nCount number of pages starting with the nStartPage.
Copy Code
|
|
---|---|
AT_ERRCOUNT IG_mpf_page_delete( [IN] HMIGEAR hMIGear, [IN] UINT nStartPage, [IN] UINT nCount ); |
Name | Type | Description |
hMIGear | HMIGEAR | Handle to the allocated multi-page image. |
nStartPage | UINT | The first page to be deleted. |
nCount | UINT | Number of pages to delete. |
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
All pixel formats supported by ImageGear Professional.
Copy Code
|
|
---|---|
HMIGEAR hMIGear; /* handle to multi-page image */ AT_ERRCOUNT nErrCount = IGE_SUCCESS; /* will hold returned error count */ UINT nPageCount = 0; /* number of pages that should get from multi-page image */ UINT i; HIGEAR hIGear; /* handle of an image */ ... /* 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 (!nErrCount) if ( !IG_mpi_page_is_valid(hMIGear, i) && (!nErrCount) ) nErrCount = IG_mpf_page_delete( hMIGear, i, 1 ); |
This function then shifts pages with higher numbers to fill the space in the external file associated with the multi-page image using function IG_mpi_file_open(). The multi-page image itself is not changed. Either the multi-page image, or in the external file pages are numbered starting with 0.
Not all format filters are supported by this operation. Use the IG_fltr_info_get() function to obtain all information about the supported features for a particular format filter. |