hy there
there are things i dont understand…i read some articles about reading in a bitmap…
and in every article the people have 2 seperate structs
something like this…
typedef struct
{
unsigned short bfType;
unsigned int bfSize;
unsigned short bfReserved1;
unsigned short bfReserved2;
unsigned int bfOffBits;
}BITMAPFILEHEADER;
typedef struct
{
unsigned int biSize;
unsigned int biWidth;
unsigned int biHeight;
unsigned short biPlanes;
unsigned short biBitCount;
unsigned int biCompression;
unsigned int biSizeImage;
unsigned int biXPelsPerMeter;
unsigned int biYPelsPerMeter;
unsigned int biClrUsed;
unsigned int biClrImportant;
}BITMAPINFOHEADER;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i got no problem with the structures...i got a problem with reading it in...
most of the writer loading the BITMAPFILEHEADER in one step...why they r able to do this?
cause the "real" size is 14 bytes (3 shorts 2 ints)...but the compiler will resize it to 16 (2 bytes padding due to 4 byte align) and there i see the prob...i read 16 instead of 14 bytes...so why i can do that? the
r they using 2 byte alignment?
am i wrong in my thinking?
thx for help
bye
apo