As initially described here:
viewtopic.php?p=61803
there may be a bug in either assigned or reported rendering intent with PNG files using 'mogrify -intent someintent somefile.png' followed by 'identify -verbose somefile.png'.
The error is exhibited by assigning some rendering intent with mogrify. After this, identify reports a value for rendering intent which matches the value assigned with mogrify, but the program TweakPNG reports a different value.
I take this as a bug in either TweakPNG or ImageMagick. Drarakel suggested I report it here, so here you go.
http://entropymine.com/jason/tweakpng/
Thanks.
Rendering intent in mogrify / identify
Re: Rendering intent in mogrify / identify
From 'profile.h' (IM v6.6.3-2):
And ImageMagick reads the intent from PNG by reading the original number and adding 1 - and sets it by subtracting 1 from the internal number (png.c).
But the order in the PNG specs is like this:
http://www.libpng.org/pub/png/spec/1.2/ ... tml#C.sRGB
Example: The intent in ImageMagick is set to "Relative". This is number 4 in the above enum. IM writes it as 3 into the PNG file (4-1). But 3 is "Absolute". So, other tools will report this as "Absolute".
Code: Select all
typedef enum
{
UndefinedIntent,
SaturationIntent,
PerceptualIntent,
AbsoluteIntent,
RelativeIntent
} RenderingIntent;
But the order in the PNG specs is like this:
http://www.libpng.org/pub/png/spec/1.2/ ... tml#C.sRGB
ImageMagick itself does fine with its own order of the intents. But the numbers are not compliant to the PNG specs, and so the other tools report completely different intents.The following values are defined for the rendering intent:
0: Perceptual
1: Relative colorimetric
2: Saturation
3: Absolute colorimetric
Example: The intent in ImageMagick is set to "Relative". This is number 4 in the above enum. IM writes it as 3 into the PNG file (4-1). But 3 is "Absolute". So, other tools will report this as "Absolute".
Re: Rendering intent in mogrify / identify
The problem you reported will be fixed in ImageMagick 6.6.3-3 Beta within a day or two. Thanks.
Re: Rendering intent in mogrify / identify
Works good. Thank you!