#include "mfcpch.h"
#include <stdio.h>
#include "imgtiff.h"
#include "helpers.h"
Go to the source code of this file.
| #define ENTRIES 19 /*no of entries */ |
| #define START 8 /*start of tag table */ |
| int CountTiffPages |
( |
FILE * |
fp | ) |
|
Definition at line 80 of file imgtiff.cpp.
81 if (fp ==
NULL)
return 0;
84 if (fread(&filetype,
sizeof(filetype), 1, fp) != 1 ||
85 (filetype !=
INTEL && filetype !=
MOTO)) {
88 fseek(fp, 4L, SEEK_SET);
92 if (fread(&start,
sizeof(start), 1, fp) != 1) {
100 fseek(fp, start, SEEK_SET);
102 if (fread(&entries,
sizeof(entries), 1, fp) != 1) {
106 ReverseN(&entries,
sizeof(entries));
108 fseek(fp, entries *
sizeof(
TIFFENTRY), SEEK_CUR);
void ReverseN(void *ptr, int num_bytes)