CImageDisplay.GetBitMasks method

The GetBitMasks method retrieves the color masks for a specified VIDEOINFO format.

Syntax

const DWORD* GetBitMasks(
   const VIDEOINFO *pVideoInfo
);

Parameters

pVideoInfo

Pointer to the VIDEOINFO structure.

Return value

Returns an array of three DWORD values.

Remarks

If the biCompression member is BI_BITFIELDS, the method returns a pointer to the color masks that are supplied in the dwBitMasks member. If the biCompression member is BI_RGB, the method returns the color masks that correspond to the bit depth. If the method fails (for example, the bit depth is less than 16), the method returns the array {0,0,0}.

Requirements

Header
Winutil.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CImageDisplay Class