GetTiffRGBQuad

#include "BITIFF.H"

HANDLE CALLBACK GetTiffRGBQuad(TIFFFILE hChain, int nImage)

Description

Builds a BITMAPINFO structure based on the information in the corresponding tags. It also contains the RGBQUAD array if the n-th image in the TIFF file is not a 16 bit color, 24 bit or 32 bit image. See GetTiffDimensions() "Description" section for more information.

Parameters

TIFFFILE

hChain

TIFF image chain handle.

int

nImage

Index of the image in the chain.

Return values

The function returns a handle of a BITMAPINFO structure or NULL in case of any error. It sets the error code to TTOOFEWINFO if indispensable tags are missing or TBADNUMBEROFCOLORS if incorrect bit depth or planar configuration is detected. Call TiffError() to get the error code.

Programming notes

It is your responsibility to free the buffer referred by the return value by calling MS Windows SDK GlobalFree() function.

Requirements

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

Library :    Use BiTIFF.lib.

DLLs :       BiTiff.dll.