This function obtains the number of pages in a multi-page file.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_fltr_pagecount_file_format(
AT_MODE nFormat,
const LPSTR lpszFileName,
LPUINT lpPageCount
);
|
Arguments:
nFormat | 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. |
lpszFileName | Path and name of the file to get the page count for. The path can be absolute or relative. |
lpPageCount | Number of pages returned by this function. |
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 Professional.
Sample:
ASCII
Example:
Copy Code | |
---|---|
UINT nPageCount;
AT_ERRCOUNT nErrCount = IG_fltr_pagecount_file_format(IG_FORMAT_TIF, "picture.tif", &nPageCount);
|
Remarks:
If nFormat = IG_FORMAT_UNKNOWN then ImageGear attempts to detect the file format automatically, and then detects the page count. Otherwise, ImageGear skips the file format detection and counts image page using the specified format filter.