This function obtains the number of pages in a multi-page file.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_fltr_pagecount_file_format(
AT_MODE nFormat,
const LPSTR lpszFileName,
LPUINT lpPageCount
);
|
Name | Type | Description |
---|---|---|
nFormat | 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. |
lpszFileName | const LPSTR | Path and name of the file to get the page count for. The path can be absolute or relative. |
lpPageCount | LPUINT | Number of pages returned by this function. |
All pixel formats supported by ImageGear for C and C++.
ASCII
Copy Code
|
|
---|---|
UINT nPageCount;
AT_ERRCOUNT nErrCount = IG_fltr_pagecount_file_format(IG_FORMAT_TIF, "picture.tif", &nPageCount);
|
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.