Mail Archives: djgpp/2001/10/05/16:19:33
I'm trying to load/draw a bitmap from a file (PLEASE don't answer
"Allegro")
I searched for info, and the file is as follow:
BITMAPFILEHEADER //struct heading the file
BITMAPINFOHEADER //struct with info on the bitmap
RGBQUAD[] //array of RGB triplets
bitmapbits[] //the actual bitmap
I tried reading a bitmapbit and drawing it, but it was awfully slow.
How can I read ALL the bits, then draw them. It seems I must have a
BITMAP struct looking like
typedef struct tagBITMAP {
BITMAPFILEHEADER bmfh;
BITMAPINFOHEADER bmih;
RGBQUAD //and it's here I don't know how
bitmapbits // same
} BITMAP;
How can I make those arrays, not knowing their size in the first
place?
Is RGBQUAD *rgb; correct?
- Raw text -