#include "mfcpch.h"
#include <stdio.h>
#include "imgtiff.h"
#include "helpers.h"
Go to the source code of this file.
Macros |
#define | INTEL 0x4949 |
#define | MOTO 0x4d4d |
#define | ENTRIES 19 /*no of entries */ |
#define | START 8 /*start of tag table */ |
Macro Definition Documentation
#define ENTRIES 19 /*no of entries */ |
#define START 8 /*start of tag table */ |
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;
}