#include "BITIFF.H"
BOOL CALLBACK EncodeCcittImage( int nFile,
UINT wWidth,
UINT wHeight,
DWORD dwCompression,
INT_PTR lUserData,
FILLPROC lpLineFn)
Description
Encodes a monochrome image into a file. The raw image data must be passed to the function through the user defined callback function line by line. The file pointer must be positioned before calling this function. The function supports all the standard CCITT compression types and can create uncompressed monochrome images as well.
Parameters
|
int |
nFile |
Image file handle. |
|
UINT |
wWidth |
Width of the image in pixels. |
|
UINT |
wHeight |
Height of the image in pixels. |
|
DWORD |
dwCompression |
Compression type. The low order word contains the main type and the high order word contains the additional info. |
|
INT_PTR |
lUserData |
User defined info. It is passed to the callback function as a third parameter unchanged. |
|
FILLPROC |
lpLineFn |
Callback function that will pass the raw DIB lines to the function. |
Return values
TRUE on success, FALSE if failed. It sets the error flag to TUNKNOWNCOMPRESSION if the compression type of the image is not supported, or to TCOMPRESSIONFAILED if the compression has failed.
Programming notes
See the notes at EncodeTiffImage().
Requirements
Header : Declared in BiTiff.h; include BiTiff.h.
Library : Use BiTIFF.lib.
DLLs : BiTiff.dll.
References to related functions
See DecodeTiffImage(), EncodeTiffImage() and DecodeCcittImage().
Code example
See example at DecodeCcittImage().