jsummers / bmpsuite

A set of Windows BMP image files, for testing purposes
https://entropymine.com/jason/bmpsuite/
GNU General Public License v3.0
56 stars 16 forks source link

Wrong header size for BitField compression #1

Closed mayeut closed 8 years ago

mayeut commented 9 years ago

Hi,

The header size used for the following images is 40 bytes. Shouldn't it be 52 bytes ?

The BMP_file_format wikipedia article suggests so.

jsummers commented 8 years ago

I think that either 40 or 52 would be valid, but 40 is better. Microsoft abandoned the 52-byte header format, and I don't have any documentation about it. The bmpsuite files use the "BITMAPINFOHEADER" header format, which is always 40 bytes. In that version of BMP, the 12-byte BITFIELDS segment is not considered to be part of that header.

mayeut commented 8 years ago

Thanks, I finally figured this out reading carefully the Microsoft documentation. IMHO, the wikipedia article was misleading.