ImageGear for C and C++ on Windows v20.0 - Updated
IG_fltr_pageswap_file
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Filter Functions > IG_fltr_pageswap_file

This function swaps two pages in a multipage file.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_fltr_pageswap_file(
   const LPSTR lpszFileName,
   AT_MODE nFormatType,
   UINT nPage1,
   UINT nPage2
);

Arguments:

Name Type Description
lpszFileName const LPSTR Path and name of the file to swap the pages in. The path can be absolute or relative.
nFormatType AT_MODE A constant indicating the file format of the input file. See enumIGFormats for possible values. Set to IG_FORMAT_UNKNOWN to let ImageGear detect the file format.
nPage1 UINT Number of page 1 to swap with page 2.
nPage2 UINT Number of page 2 to swap with page 1.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

Sample:

None

Example:

 
Copy Code
AT_ERRCOUNT     nErrcount;            // Count of returned errors on stack
nErrcount = IG_fltr_pageswap_file("picture_multipage.tif", IG_FORMAT_TIF, 1, 2);

Remarks:

Use IG_fltr_info_get function to determine whether the format filter supports page swapping. If the flags returned by this function contain IG_FLTR_PAGESWAPSUPPORT, then the format filter supports the swapping procedure.

See also the section Loading and Saving.

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