Go to the source code of this file.
Function Documentation
int CountTiffPages |
( |
FILE * |
fp | ) |
|
Definition at line 80 of file imgtiff.cpp.
{
if (fp ==
NULL)
return 0;
if (fread(&filetype, sizeof(filetype), 1, fp) != 1 ||
return 0;
}
fseek(fp, 4L, SEEK_SET);
int npages = 0;
do {
if (fread(&start, sizeof(start), 1, fp) != 1) {
return npages;
}
if (start <= 0) {
return npages;
}
fseek(fp, start, SEEK_SET);
if (fread(&entries, sizeof(entries), 1, fp) != 1) {
return npages;
}
fseek(fp, entries *
sizeof(
TIFFENTRY), SEEK_CUR);
++npages;
} while (1);
return 0;
}