#include "BITIFF.H"
HBITMAP CALLBACK LoadTiffChainIntoBitmap(TIFFFILE hChain, int nImage)
Description
Loads the n-th image from the opened TIFF file into a bitmap. Does all low level calls internally in the DLL. To retrieve the last error, use the TiffErrorString(). One must open the TIFF file with the OpenTiffFile() function and use the GetTiffImage() to read the n-th image in the chain.
Parameters
|
TIFFFILE |
hChain |
TIFF image chain handle. |
|
int |
nImage |
Index of the asked image. |
Return values
The handle to the bitmap is NULL if any error occurs.
Programming notes
This function was designed to be used with high-level application generators like Borland C++ Builder, Borland Delphi or MS Visual Basic.
Requirements
Header : Declared in BiTiff.h; include BiTiff.h.
Library : Use BiTIFF.lib.
DLLs : BiTiff.dll.
References to related functions
See SaveBitmapInTiffFile(), SaveTiffFileFromClipboard(),LoadTiffChainIntoDIB().
Code example
#include "BITIFF.H"
TIFFFILE hChain;
int nImage = 0;
HANDLE hBitmap;
.
if((hChain = OpenTiffFile((LPSTR)"test.tif",T_CREATE) != NULL)
{
// Get the TIFF image in the chain.
// The TIFF file can hold more than one image. The first image is 0 the
// second images is 1 and so on.
if (GetTiffImage(hChain, int nImage))
{
hBitmap = LoadTiffChainIntoBitmap(hChain, nImage);
}
}
...