NumberOfTiffImages

#include "BITIFF.H"

int CALLBACK NumberOfTiffImages(TIFFFILE hChain, UINT wImageType)

Description

Returns the number of images in a TIFF image chain whose type exactly (!) matches the filter defined in wImageType. As defined in the NEWSUBFILETYPE (SUBFILETYPE in older versions) tag, each image has an own type in a TIFF file (image chain). The new subfile type is defined as a bitfield, while the old type is enumerated. This function tests the SUBFILETYPE tag only if the NEWSUBFILETYPE tag does not exist. The next table defines the bits of the bitfield in the NEWSUBFILETYPE tag:

Bit

Description

REDUCEDVERSION

The image is a reduced resolution version of another image in the same TIFF file.

APAGEOFAMULTIPAGE

The image is a single page of a multi-page image (PAGENUMBER tag defines page number).

TRANSPARENCYMASK

The image defines a transparency mask for another image in the same TIFF file.

REGISTEREDTIFF

The image has been registered by GetTiffImage() or DefineTiffImage().

Use NORMALVERSIONS to count all normal images. It can be used only with REGISTEREDTIFF. Use ALLVERSIONS to count all images. ALLVERSIONS can't be used with other flags.

Parameters

TIFFFILE

hChain

TIFF image chain handle.

UINT

wImageType

Image type filter.

Return values

Number of images in the image chain that match the type defined in wImageType.

Programming notes

The SUBFILETYPE tag (h100) is no longer recommended, so use NEWSUBFILETYPE tag to describe the image type in the future.

Requirements

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

Library :    Use BiTIFF.lib.

DLLs :       BiTiff.dll.