Hi all,
I am trying to write a bmp image to a bmp file.
I can get it to work as long as i use the structs provided by the windows.h header. However if i define the structs myself it breaks my code.
It is one struct in particular, if i use the windows.h BITMAPFILEHEADER my program works fine. However if i use this struct it does not work:
i've found that the windows struct is 14 bytes in size and my struct is 16 bytes in size and i think that this is the issue. However, i cannot understand why my struct is 2 bytes larger?Code:struct BITMAPFILEHEADER { unsigned short bfType; unsigned long bfSize; unsigned short bfReserved1; unsigned short bfReserved2; unsigned long bfOffBits; };
Any advice would be greatly appreciated.