LoadTiffIntoDIB

#include "BITIFF.H"

HANDLE CALLBACK LoadTiffIntoDIB( LPSTR  lpszFileName,
int         nImage,
BOOL  bDispInfo)

Description

Loads the n-th image from the TIFF file lpszFileName into a device independent bitmap (DIB). Does all low level calls internally in the DLL. The handle to the bitmap is NULL if any error occurs. To retrieve the last error, use the TiffErrorString(). If the 'bDispInfo' is set to TRUE, a dialog box is displayed with the characteristic information of the image, such as image width, length and etc.

Parameters

LPSTR

lpszFileName

Path to the TIFF file.

int

nImage

The nth image, or page number, for multi page images.  Numbering is zero based, for example:  Page 2 would be referenced as ‘1’

BOOL

bDispInfo

Display dialog box. The dialog box is implemented in BiDlgs.dll. If this parameter is TRUE and BiDlgs.dll does not exists, the function returns NULL, and the error code will be TNOBIDLGS.

Return values

The handle to device independent bitmap is NULL if any error occurs. The palette information is in the DIB.

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, BiDlgs.dll.

References to related functions

See SaveDIBInTiffFile(), SaveBitmapInTiffFile().