BITMAP structures

hi,
i recently found out that a .bmp file contains of the following data structures:

BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER bmih;
RGBQUAD aColors[];
BYTE aBitmapBits[];


I have some doubts regarding this...
Why is the aColors array 1D(one-dimentional). Actually it should be 2D(two-dimensional) such as aColors[height][width]... right??
if not then how is it mapped to the rect\square image!

and what is this BYTE structure?
any info on this?
what are the members of this structure and what are their sizes?

an example would help me a lot.. :|

Thanks in Advance :)
I have no idea, but I guess that aColors is just a list of colors used. I'd have to see the rest of the code..

A BYTE is defined as unsigned char... I think, because that's a byte.
A bitmap has a palette that defines the avaiable colours, aColors.

Then each pixel's value is a colour index into the palette.

A BMP is exactly that, a bitmap. It doesn't know about shapes or anything like that.
Topic archived. No new replies allowed.