ImageGear Professional DLL v17.1 for Windows Accusoft
IG_mpf_page_swap
Send Feedback  
ImageGear Professional DLL v17.1 for Windows > API Reference Guide > Core Component API Reference > Core Component Functions Reference > Multi Page Image File Functions > IG_mpf_page_swap

Glossary Item Box

If the multi-page image is associated with an external file, then this function swaps pages with the given page numbers in the external file.

Declaration:

  Copy Code
AT_ERRCOUNT ACCUAPI IG_mpf_page_swap( 
        [IN] HMIGEAR hMIGear, 
        [IN] UINT nPage1, 
        [IN] UINT nPage2
);

Arguments:

hMIGear The handle of the multi-page image.
nPage1 The number of first page to swap.
nPage2 The number of second page to swap.

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

Sample:

MFC Multipage

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 */
 ...
/* initialize multi-page image and assign it with external file */
nErrCount = IG_mpf_page_count_get( hMIGear, &nPageCount );
/* Swap first page and last pages */
if (!nErrCount && nPageCount > 1)
        nErrCount += IG_mpf_page_swap(hMIGear, 0, nPageCount - 1 );

Remarks:

If the multi-page image is not associated with an external file, an error is returned. Pages are numerated starting with 0. The multi-page image is not changed.

Not all format filters support IG_mpf_page_swap() mode. Use the IG_fltr_info_get() function to obtain information about the supported features for specific format filters.
©2012. Accusoft Corporation. All Rights Reserved.