convert and identify fails with known incorrect sRGB profile
Posted: 2014-07-08T09:18:16-07:00
IM fails sometimes when working with png images with wrong profiles.
This isn't a new issue. In earlier versions, identify issues a warning and send and cli return code 0. Thats okay and one can work around the warnings. In the current version (stable and beta) this isn't the case anymore. IM returns cli code 1 and fails.
Identify returns the info's, though sends cli return code 1.
This issue indicates, that it shouldn't happen anymore.
viewtopic.php?f=3&t=25809
In the changelogs I found a hint to use -define profile:skip=icc, and that works.
icc-broken.png PNG 1969x1969 1969x1969+0+0 8-bit sRGB 448KB 0.000u 0:00.000
identify: iCCP: known incorrect sRGB profile `icc-broken.png' @ warning/png.c/MagickPNGWarningHandler/1831
$ echo $?
1
identify -define profile:skip=icc icc-broken.png
icc-broken.png PNG 1969x1969 1969x1969+0+0 8-bit sRGB 448KB 0.010u 0:00.000
$ echo $?
0
if you need the image: http://we.tl/now47r44Ve
This isn't a new issue. In earlier versions, identify issues a warning and send and cli return code 0. Thats okay and one can work around the warnings. In the current version (stable and beta) this isn't the case anymore. IM returns cli code 1 and fails.
Identify returns the info's, though sends cli return code 1.
This issue indicates, that it shouldn't happen anymore.
viewtopic.php?f=3&t=25809
+regard-warnings doesn't help.014-06-28 6.8.9-5 Glenn Randers-Pehrson <glennrp@image...>
Do not let libpng16 check ICC/sRGB profiles in non-debug runs; we do it ourselves anyway. Avoids emitting "known incorrect profile" warnings. For strict profile checking and warning, use "-debug coder".
In the changelogs I found a hint to use -define profile:skip=icc, and that works.
identify icc-broken.png2014-06-25 6.8.9-5 Cristy <quetzlzacatenango@image...>
Use -define profile:skip=icc, for example, to skip color profiles on read.
icc-broken.png PNG 1969x1969 1969x1969+0+0 8-bit sRGB 448KB 0.000u 0:00.000
identify: iCCP: known incorrect sRGB profile `icc-broken.png' @ warning/png.c/MagickPNGWarningHandler/1831
$ echo $?
1
identify -define profile:skip=icc icc-broken.png
icc-broken.png PNG 1969x1969 1969x1969+0+0 8-bit sRGB 448KB 0.010u 0:00.000
$ echo $?
0
if you need the image: http://we.tl/now47r44Ve