hi fasm users,

I defined the following structure:


struc BITMAPINFO
{
.bmiHeader BITMAPINFOHEADER
.bmiColors RGBQUAD
}
How do I have to change the line .bmiColors RGBQUAD so that it will become

An array of RGBQUAD. The elements of the array make up the color table.

the C definition in Microsoft Documentation is:
typedef struct tagBITMAPINFO { // bmi
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO;

wolf
Posted on 2003-05-05 23:43:41 by wolf
It's a bit complicated :)

You should think of "bmiColors" as a label. The amount of colors depend on the bmiHeader - and since the pixel data directly follows the color table, you can't just create the bmiColors as an array of 256 RGBQUADs.
Posted on 2003-05-06 02:19:59 by f0dder