

This function requires the decompressor handle and the input and output formats. Decompressor InitializationĪfter your application selects a decompressor that can handle the input and output formats it needs, you can initialize the decompressor by using the ICDecompressExBegin function. (Most applications use standard formats and do not need to obtain a palette.) Your application can obtain the palette by sending the ICM_DECOMPRESS_GET_PALETTE message (or use the ICDecompressGetPalette macro). If your application defines its own format by using ICDecompressExQuery, it must also obtain a palette for the bitmap ICDecompressExQuery does not provide palette definitions. The ICM_DECOMPRESS_GET_FORMAT message obtains the number of bytes the decompressor uses for the default format.

Your application should ensure that the decompressor returns successfully before it decompresses the information.īecause your application allocates the memory required for decompression, it needs to determine the maximum memory the decompressor can require for the output format. This format typically preserves the most information during decompression. The decompressor returns its suggested format in a BITMAPINFO structure. You can also send ICM_DECOMPRESS_GET_FORMAT (or the ICDecompressGetFormat macro) to retrieve the format data. Your application can determine the buffer size needed for the data specifying the decompression format by sending the ICM_DECOMPRESS_GET_FORMAT message (or use the ICDecompressGetFormatSize macro). To determine if a decompressor can handle the input format, use ICDecompressExQuery and specify NULL for the lpbiDst parameter. If the output format is not important in your application, you need only find a decompressor that can handle the input format. If you want to decompress data and your application requires a specific output format, you can use the ICDecompressExQuery function to query the decompressor to determine if it supports the input and output formats. Decompressor and Decompression Format Selection

Use the ICDecompressEx functions and macros in place of the ICDecompress equivalents. The functionality of ICDecompressEx, ICDecompressExBegin, ICDecompressE圎nd, and ICDecompressExQuery replaces that of the ICDecompress, ICDecompressBegin, ICDecompressEnd, and ICDecompressQuery functions. The ICDecompressEx functions and macros are a superset of the ICDecompress function group and provide more capabilities. After determining the input format, your application can use the ICLocate or ICOpen functions to find a decompressor that can handle it. The input format for decompression is usually obtained from the stream header. Your application handles decompression similarly to the way it handles compression, except that the input format is a compressed format and the output format is a displayable format. The functions can help you perform the following tasks:
Image decompressor series#
Your application uses a series of ICDecompressEx functions to control the decompressor.
