GNOME Bugzilla – Bug 436198
improve handling of iCCP chunk in PNG plug-in
Last modified: 2007-08-07 14:20:30 UTC
The PNG spec says: A PNG encoder that writes the iCCP chunk is encouraged to also write gAMA and cHRM chunks that approximate the ICC profile, to provide compatibility with applications that do not use the iCCP chunk. When the iCCP chunk is present, PNG decoders that recognize it and are capable of colour management [ICC] shall ignore the gAMA and cHRM chunks and use the iCCP chunk instead and interpret it according to [ICC-1] and [ICC-1A]. PNG decoders that are used in an environment that is incapable of full-fledged colour management should use the gAMA and cHRM chunks if present. A PNG datastream should contain at most one embedded profile, whether specified explicitly with an iCCP chunk or implicitly with an sRGB chunk.
2007-08-07 Sven Neumann <sven@gimp.org> * plug-ins/common/png.c (save_image): in the absence of an embedded color profile, write the sRGB chunk. I think this is good enough. We never had complaints about our PNG files and even though the spec suggests that we also write gAMA and cHRM chunks, most people will prefer a smaller PNG file than one that works slightly better with some obscure applications that interpret these chunks but ignore the sRGB and iCCP chunks.