SaveBitmapInTiffFileExt

#include "BITIFF.H"

 

BOOL CALLBACK SaveBitmapInTiffFileExt( LPTSTR     lpszFileName,
HBITMAP hBitmap,
UINT          wCompMode,
BOOL        DisplayDlg,
int               nFillOrder)

Description

Saves the bitmap in the TIFF file lpszFileName for Faxing. Does all low level calls internally in the DLL. To retrieve the last error, use the TiffErrorString(). The wCompMode must be set to one of the compression types defined in the Document Imaging SDK USER’S GUIDE, page 3-5. The wCompMode is ignored if DisplayDlg is set to TRUE.

The following compression types are defined in BITIFF.H.

            Compression type -     TCOMP_NOCOMP               - No compression

                                                TCOMP_PACKBITS             - Packbit

                                                TCOMP_LZW                        - LZW

                                                TCOMP_LZW_DIFF             - LZW with differentiation

                                                TCOMP_CCITTG2                - CCITT Group 3 1D NO EOL

                                                TCOMP_CCITTG31D           - CCITT Group 3 1D

                                                TCOMP_CCITTG32D           - CCITT Group 3 2D

                                                TCOMP_CCITTG4                - CCITT Group 4

                                                TCOMP_JPEG                       - JPEG

 

if the 'DisplayDlg' is set to TRUE, a dialog box is displayed with the different options to save the bitmap in the Tiff file.

The BITIFF.H contains the defines for

Bit order -        NORM_BIT_ORDER (1)      - High to Low

REV_BIT_ORDER (2)                      - Low to High

Parameters

LPTSTR

lpszFileName

Path to the TIFF file.

HBITMAP

hBitmap

Bitmap to be saved.

UINT

wCompMode

Compression type.

BOOL

DisplayDlg

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

int

nFillOrder

Fill order.

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

TRUE on success, otherwise FALSE.

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