#include "BITIFF.H"
HANDLE CALLBACK SaveTiffToMemory( HANDLE hTiffInMemory,
HANDLE hDIB,
UINT wCompMode,
int nFillOrder)
Description
Saves the device independent bitmap (DIB) to a memory block. Does all low level calls internally in the DLL. If hTiffInMemory parameter is a valid TIFF file in the memory, the function appends the image to the TIFF, otherwise creates a new TIFF image in the memory. 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 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.
The BITIFF.H contains the defines for
Bit order - NORM_BIT_ORDER (1) - High to Low
REV_BIT_ORDER (2) - Low to High
Parameters
|
HANDLE |
hTiffInMemory |
Handle of the memory block or NULL. |
|
HANDLE |
HDib |
Device independent bitmap to be saved. |
|
UINT |
WCompMode |
Compression type. |
|
int |
nFillOrder |
Fill order. |
Return values
Handle to the memory block, or NULL.
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.
References to related functions
SeeSaveBitmapInTiffFile(), SaveDIBInTiffFileExt(), OpenTiffInMemory().