jsummers / bmpsuite

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

Incorrect value in Intent field? #11

Closed sebras closed 4 years ago

sebras commented 4 years ago

I'm confused by the value bmpsuite assigns to the Intent field in BitmapV5GHeader. It is set to 4 and the comment implies that this means Perceptual. Did you mixed up Intent with GamutMappingIntent where 4 means LCS_GM_IMAGES?

As I read the specification Intent must be set according to LogicalColorSpace for which the valid values are:

And since you are using sRGB Chromaticity values perhaps Intent is better set to LCS_sRGB?

sebras commented 4 years ago

Image Magick and Graphics Magick also uses those bogus values (LCS_GM_BUSINESS == 1, LCS_GM_GRAPHICS == 2, LCS_GM_IMAGES == 4 and LCS_GM_ABS_COLORIMETRIC == 8 As does GIMP..!

Does this mean that the bug is actually in the specification?

jsummers commented 4 years ago

I think it must be an error in the WMF spec. The documentation for BITMAPV5HEADER is what I'm using.

sebras commented 4 years ago

I think it must be an error in the WMF spec.

Yes, the spec you pointed to as well as all these other pieces of software seems to indicate the same. I have since found an unofficial specifcation that also matches the specification you mention. That unofficial spec does document the Huffman1D, RLE24 and Alphabitfields compression methods though. :)

The documentation for BITMAPV5HEADER is what I'm using.

Thanks for pointing me to that specification. I had yet to find it.

I'll close this issue now, since it was apparently me that misunderstood things.