rejects some "sRGB" profiles that were previously acceptable to
ImageMagick. The profile embedded in "logo:" is among them.
glenn.rp> q16identify -list format | grep PNG
- PNG* rw- Portable Network Graphics (libpng 1.6.2beta02)
See http://www.libpng.org/ for details about the PNG format.
PNG00* rw- PNG inheriting bit-depth and color-type from original
PNG24* rw- opaque or binary transparent 24-bit RGB (zlib 1.2.7.1)
PNG32* rw- opaque or transparent 32-bit RGBA
PNG48* rw- opaque or binary transparent 48-bit RGB
PNG64* rw- opaque or transparent 64-bit RGBA
PNG8* rw- 8-bit indexed with optional binary transparency
q16convert: known incorrect sRGB profile `logo.png' @ error/png.c/MagickPNGErrorHandler/1761.
glenn.rp>
libpng-1.6.1/png.c says
- if (png_sRGB_checks.is_broken)
{
/* These profiles are known to have bad data that may cause
* problems if they are used, therefore attempt to
* discourage their use, skip the 'have_md5' warning below,
* which is made irrelevant by this error.
*/
png_chunk_report(png_ptr, "known incorrect sRGB profile",
PNG_CHUNK_ERROR);
}
/* Warn that this being done; this isn't even an error since
* the profile is perfectly valid, but it would be nice if
* people used the up-to-date ones.
*/
I'm getting more than just a warning. "convert" doesn't write an
output PNG. I got the same behavior with ImageMagick built with
libpng-1.6.1 and running with the 1.6.2beta02 shared library.
I have checked in a simple fix (adding a call to png_set_benign_errors())
that causes IM to issue a warning instead of an error. SVN r 11879.
With the fix I get
glenn.rp> q16convert logo: logo.png
q16convert: known incorrect sRGB profile `logo.png' @ warning/png.c/MagickPNGWarningHandler/1787.
q16convert: profile 'sRGB': 0h: inconsistent rendering intents `logo.png' @ warning/png.c/MagickPNGWarningHandler/1787.
glenn.rp>
and logo.png is written without an iCCP chunk.