LoadTiffIntoBitmap

#include "BITIFF.H"

HBITMAP CALLBACK LoadTiffIntoDIB( LPTSTR          lpszFileName,
int         nImage,
BOOL  bDispInfo)

Description

Loads the n-th image from the TIFF file lpszFileName into a bitmap. Does all low level calls internally in the DLL. The handle to the bitmap is NULL if any errors occur. 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

LPTSTR

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.

Additional Information

This example shows how to use the dll when loading statically including the header file. Otherwise if the dll is loaded dynamically, for further information read the “About the difference of static and dynamic library loading” section of the manual.

Return values

The handle to the bitmap is NULL if any errors occur.

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().