Page 1 of 1

possible bug/diagnostics printed w/warning in png processing

Posted: 2012-03-28T16:53:43-07:00
by fmw42
IM 6.7.6.2 Q16 Mac OSX Snow Leopard.

Glenn,

I am getting something like the following messages after processing certain png images. In this case it was after a compare of two pngs. But it has happened with convert as well at times.

convert azunh.png -shave 20x20 -fuzz 10% -trim +repage -threshold 70% azunh_test.png
convert FeAYq.png -threshold 70% FeAYq_test.png
compare -metric rmse -subimage-search 1FeAYq_test.png azunh_test.png similarity_test.png
wx=0.280560, wy=0.295820, rx=0.631070, ry=0.346230
gx=0.292570, gy=0.596170, bx=0.127380, by=0.064110
wx=0.280560, wy=0.295820, rx=0.631070, ry=0.346230
gx=0.292570, gy=0.596170, bx=0.127380, by=0.064110
6290.2 (0.0959824) @ 44,19
compare: Ignoring incorrect cHRM value when sRGB is also present `1FeAYq_test.png' @ warning/png.c/MagickPNGWarningHandler/1754.

This seems to happen only with these images, so I suspect that they are malformed. The images are from a post at viewtopic.php?f=2&t=20626&p=82691#p82684

The stuff in red above seems to be some kind of diagnostics, but perhaps you want to suppress that.

Fred

Re: possible bug/diagnostics printed w/warning in png proces

Posted: 2012-03-28T20:52:34-07:00
by glennrp
The red is the numbers that appeared in the cHRM chunk. They are wrong numbers for an sRGB image.
In libpng-1.5.4 and later these are included in a png_warning() rather than displayed with printf().

Glenn