I have a strange problem with creating a bitmap file. I'm using the MSDN BITMAPINFOHEADER Structure for creating a Bitmap file. It's 8 Bit grayscale, no compression, topside-down. Data are coming over DMA from a camera and are unsigned 8 bit grayscale values.
If I open the picture, it has color and contrast seems to be 250% too high?!
I checked the header information but couldn't find any reason for this behavior.
28 00 00 00 Sizeof(Bitmapinfoheader);
00 02 00 00 =0x200 = 512 px.
00 02 00 00 same
01 00 = 1 - Standard. Not used anymore.
08 00 Color dept = 8 bit.
00 00 00 00 Compression: 0 = none.
00 00 00 00 Filesize or zero
00 00 00 00 X-Dot-Per-Meter, may be left 0
00 00 00 00 y-Dot-Per-Meter, may be left 0
00 00 00 00 If zero, all 255 colors are used
00 00 00 00 If zero, no color table values are used