ImageGear for C and C++ on Linux v20.0 - Updated
IG_mpf_page_unload
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multi Page Image File Functions > IG_mpf_page_unload

This function calls IG_image_delete() for the nCount number of pages in the multi-page image, starting with the nStartPage position.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_mpf_page_unload( 
        [IN] HMIGEAR hMIGear, 
        [IN] UINT nStartPage, 
        [IN] UINT nCount
);

Arguments:

Name Type Description
hMIGear HMIGEAR The handle to the valid multi-page image.
nStartPage UINT The number of the first page to unload.
nCount UINT The total number of pages to unload.

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++.

Example:

 
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 ( IG_mpi_page_is_valid(hMIGear, i) && (!nErrCount) )
        nErrCount = IG_mpf_page_unload( hMIGear, i, 1 );

Remarks:

The number of pages in the multi-page image is not changed, but the specified positions are removed and set to a default value of NULL. The pages are numbered starting with 0.

Is this page helpful?
Yes No
Thanks for your feedback.