ICM_DECOMPRESS_GET_FORMAT

The ICM_DECOMPRESS_GET_FORMAT message is sent to a video decompression driver to obtain the format of the decompressed data.

Parameters

dwParam1

Specifies a pointer to a BITMAPINFO data structure describing the input format.

dwParam2

Specifies zero or a pointer to a BITMAPINFO data structure used to return the output format.

Return Value

If dwParam2 is zero, the driver returns the size of the output format. If dwParam2 is not zero, the driver returns a status value (either ICERROR_OK or an error status).

Comments

If dwParam2 is zero, the driver returns only the size of the output format. An application sets dwParam2 to zero to determine the size of the buffer it needs to allocate.

If dwParam2 is nonzero, the driver should fill the BITMAPINFO data structure with the default output format corresponding to the input format specified for dwParam1. If the compressor can produce several different formats, the default format should be the one that preserves the greatest amount of information.

For example, if a driver can produce either 24-bit full-color images or 8-bit gray-scale images, the default should be 24-bit images. This ensures the highest possible image quality if the video data must be edited and recompressed.