DefineTiffImage

#include "BITIFF.H"

int CALLBACK DefineTiffImage(TIFFFILE hChain)

Description

Creates an empty TIFF image structure in the image chain. The chain must have been opened with parameter T_CREATE or T_APPEND in OpenTiffFile() or in OpenTiffInMemory(). Several images can be built simultaneously in a given TIFF image chain. They can be referred by hChain and by the returned image identifier in further function calls. The sequence of the images in the newly created TIFF file depends only on the sequence you call EncodeTiffImage(), not on the sequence you have called DefineTiffImage() itself.

Parameters

TIFFFILE

hChain

Handle of a TIFF image chain.

Return values

A non-negative image structure identifier or -1 on any error.

Requirements

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

Library :    Use BiTIFF.lib.

DLLs :       BiTiff.dll.

References to related functions

See EncodeTiffImage() and DropTiffImage().

 

 

Code example

#include "BITIFF.H"

TIFFFILE hTiff;

int nImageID;

.

.

if((hTIFF = OpenTiffFile((LPSTR)"test.tif",T_CREATE) != NULL)

{

            // Define a TIFF image in the chain.

            nImageID = DefineTiffImage(hTiff);

            if (nImageID >= 0)

            {

                        ... Normal operation ...

            }

}

...