DecodeCcittImageExt

#include "BITIFF.H"

 

BOOL CALLBACK DecodeCcittImageExt(int         nFile,
UINT          wWidth,
UINT          wHeight,
DWORD    dwCompression,

                                                                  BOOL        bBlackIs1,

                                                                  BOOL        bEncodedByteAlign,
LONG        lUserData,
FILLPROC lpLineFn)

Description

Uncompresses a monochrome image from a file. The decoded image data can be retrieved through the user defined callback function.. The file pointer must be positioned to the first byte of the image.. The function supports all the standard CCITT compression types and can process uncompressed monochrome images as well. Also inverted and byte-aligned coded images can be loaded.

Following Compression types are defined in the "BITIFF.H" file:

TIFF_CCITT

CCITT_GROUP3

CCITT_GROUP4

Additional compression modifiers can be OR-ed to the DWORD compression value as the high word:

CCITT_1D

CCITT_2D

CCITT_UNCOMP

CCITT_FILLBITS

Parameters

int

iFile

Image file handle.

UINT

wWidth

Width of the image in pixels.

UINT

wLength

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.

BOOL

BOOL

LONG

bBlackIs1

bEncodedByteAlign

lUserData

If TRUE, the image is inverted (the ‘1’ pixel value is black).

If TRUE, every new line’s code starts at new byte

User defined info. It is passed to the callback function as a third parameter unchanged.

 

FILLPROC

 

lpLineFn

 

Callback function that will get the decoded DIB lines.

Return values

TRUE on success, FALSE if failed. Error flag set to TUNKNOWNCOMPRESSION if the image compression type is not supported, or TCOMPRESSIONFAILED if the decompression has failed.

Programming notes

See the notes at DecodeTiffImage().

Requirements

Header :     Declared in BiTiff.h; include BiTiff.h.

Library :    Use BiTIFF.lib.

DLLs :       BiTiff.dll.

References to related functions

See DecodeTiffImage(), EncodeTiffImage() and EncodeCcittImage().