GetTiffFileInfo

#include "BITIFF.H"

BOOL CALLBACK GetTiffFileInfo(TIFFFILE hChain, TIFFHDR FAR *Info)

Description

Retrieves information on a whole TIFF file. The function fills the Info data structure with file oriented properties of the TIFF file. Use GetTiffImageInfo() or GetTiffImageInfoBuffer() to retrieve information on the images themselves. Due to the variable number of TIFF tags, the two function mentioned above retrieve information only for one TIFF tag at a time, while the GetTiffFileInfo() passes all global information of a TIFF file with one call.

Parameters

TIFFFILE

hChain

Valid handle of a TIFF image chain.

TIFFHDR FAR

*Info

TIFF image chain information structure.

typedef struct tag_TIFFHDR

{

char

cFileName[MAXPATH];

Associated TIFF file name.

WORD

nByteOrder;

Byte order (High/Low).

int

iNImages;

Number of images in the file.

DWORD

dwFirstTID;

Offset of the 1st TID in the file.

} TIFFHDR;

Return values

TRUE on success, FALSE if hChain is not a valid image chain handle.

Programming notes

The nByteOrder field of the Info structure may be either LH_BYTE_ORDER or HL_BYTE_ORDER. LH_BYTE_ORDER means that byte order is always from least significant to most significant, for both 16-bit and 32-bit integers. HL_BYTE_ORDER means that byte order is always from most significant to least significant. LH_BYTE_ORDER is used by computers with Intel processors (IBM compatible computers). HL_BYTE_ORDER is used with computers with Motorola processors (Macintosh computers). There is an automatic conversion when reading a TIFF file, so this information is only interesting for you when you want to create your own TIFF file and you want to transport it to a Motorola-based computer using the HL_BYTE_ORDER storing method.

Requirements

Header :     Declared in BiTiff.h; include BiTiff.h.

Library :    Use BiTIFF.lib.

DLLs :       BiTiff.dll.

References to Related Functions

See ModiTiffFileInfo() and NumberOfTiffImages().