BITMASKS macro

The BITMASKS macro retrieves the color masks from a VIDEOINFO structure.

Syntax


DWORD* BITMASKS(
    pbmi
);

Parameters

pbmi

Pointer to a VIDEOINFO structure.

Return value

Returns a DWORD pointer value that is the address of the dwBitMasks member of the VIDEOINFO structure.

Remarks

This macro calculates the address as an offset from the start of the BITMAPINFOHEADER structure, using the value of bmiHeader.biSize. Make sure to initialize the VIDEOINFO structure before calling this macro.

You can access the color masks in the array using the following constants, defined in Amvideo.h:

#define iRED   0
#define iGREEN 1
#define iBLUE  2  

Examples


VIDEOINFO *pVi;

/* Initialize pVi (not shown). */

DWORD dwRed   = BITMASKS(pVi)[iRED];
DWORD dwGreen = BITMASKS(pVi)[iGREEN]; 
DWORD dwBlue  = BITMASKS(pVi)[iBLUE];

Requirements

Header

Amvideo.h (include Streams.h)

See also

Video and Image Functions

 

 

Show: