SaveDIBInIOCAFormatMem Method

 

Description

Saves an image into an IOCA file in memory.

Syntax

Handle = [BITIFF.] SaveDIBinIOCAFormatMem Dib, Compression, Quality

Parameters

Dib

LONGLONG

Handle to a DIB image.

 

Compression

Long

The compression to use. The following compression types are supported:

 

 

 

·         1: IBM MMR (1 bit)

·         3: Not compressed (1 bit)

·         128: CCITT Group 3, 1 Dimensional (1 bit)

·         129: CCITT Group 3, 2 Dimensional (1 bit)

·         130: CCITT Group 4 (1 bit)

·         131: JPEG (8 bit grayscale or 24 bit)

 

Quality

Long

Compression quality. It is only used by the JPEG compression type. The value must be between 1 and 99.

Return Value

Handle to the IOCA file in memory on success, NULL on failure. Use the BiTiffGetLastErrort function to get the error code. The handle is allocated using the GlobalAlloc Windows API function. Use the GlobalSize function to get the size of the IOCA image, the GlobalLock function to get a pointer to the image, and use the GlobalFree function to free the memory.