SaveTiffForCiscoFormat

#include "BITIFF.H"

 

BOOL CALLBACK SaveTiffForCiscoFormat(              LPTSTR    lpszFileName,
                                                                        HANDLE hDIB,
                                                                        UINT        wCompMode,

                                                                        int              nFillOrder,
                                                                        BOOL       DisplayDlg)

Description

Saves the device independent bitmap (DIB) in the TIFF file lpszFileName with CISCO format. In the TIFF CISCO format the tags are in the beginning of the file. If the lpszFileName exists, the function appends the DIB to the image. 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. The wCompMode and nFillOrder are 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

 

For color images the following flags can also be specified using a binary OR operation with one of the compression flags:

TSPEC_16BIT            - Save the image in 16 bit grayscale format .
TSPEC_12IN16BIT   - Save the image in 12 bit grayscale format.
TSPEC_CMYK          - Save the image as a CMYK image.
TSPEC_YCBCR        - Save the image as a YCBCR image

Example: To create a CMYK uncompressedTIFF file, use the TCCOMP_NOCOMP|TSPEC_CMYK value.

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.

HANDLE

hDIB

Device independent bitmap to be saved.

UINT

wCompMode

Compression type.

int

nFillOrder

Fill order.

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.

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++, 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(),SaveDIBInTiffFileExtExt()