ICDecompressGetPalette(3mms) — Subroutines
Name
ICDecompressGetPalette --- Obtain the palette for the output format of a decompressor
Syntax
#include <mme/mme_api.h>
MMRESULT ICDecompressGetPalette(HIC hic,
LPBITMAPINFOHEADER lpbiInput,
LPBITMAPINFOHEADER lpbiOutput);
Arguments
HIC hic
Specifies a handle to a decompressor.
LPBITMAPINFOHEADER lpbiInput
Specifies a pointer to a BITMAPINFOHEADER data structure indicating the format of the input data.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressGetPalette function.
See the mmeAllocMem(3mms) reference page for more information about allocating memory for data structures.
LPBITMAPINFOHEADER lpbiOutput
Specifies a pointer to a BITMAPINFOHEADER data structure used to return the color table. The space reserved for the color table must accommodate a full color table for the output format. For instance, if the biBitCount field is 4, then the table must accommodate 16 entries; if the biBitCount field is 8, then the table must accommodate 256 entries.
The BITMAPINFOHEADER data structure must be allocated with the mmeAllocMem function before being passed to the ICDecompressGetPalette function.
See the mmeAllocMem(3mms) reference page for more information about allocating memory for data structures.
Description
The ICDecompressGetPalette function obtains the palette for the output format of a decompressor. The palette is the range of colors that can be used for display.
The return value will be the size in bytes that includes the colormap supported by the decompressor.
Extensions
Digital has extended the data in the BITMAPINFOHEADER and RGBQUAD data structures pointed to by the lpbiOutput argument of the ICDecompressGetPalette function. These extensions have been made in order to provide the palette information necessary to render images to the X image format.
Return Values
Returns the size of the output data format structure if the function is successful; otherwise, it returns one of the following error codes:
ICERR_BADHANDLE@T{ The hic argument is invalid, the decompressor is not open, or the decompressor is not open for decompression. T} ICERR_BADFORMAT@T{ The lpbiInput and lpbiOutput arguments are not acceptable formats. T}