Page 1 of 1

IM-6.7.8-3 fails to PNG-encode ICO files

Posted: 2012-07-17T07:20:22-07:00
by glennrp
PNG-encoding of ICO files does not work in IM-6.7.8-3 because of a bug that causes coders/icon.c to never use PNG encoding (at line 854, both "> 256L" should be ">= 256L"). Also, we need to ensure that we only write png32-formatted PNGs inside an ICO, according to http://msdn.microsoft.com/en-us/library/aa511280.aspx (otherwise at least Fiirefox will reject them). That can be accomplished by setting the png:format=png32 artifact in icon.c; the png encoder will read this artifact and write a PNG32.

Re: IM-6.7.8-3 fails to PNG-encode ICO files

Posted: 2012-07-17T12:24:44-07:00
by glennrp
I have checked in a fix to IM-6.7.8-4 (SVN revision 8691) and IM-7.0.0 (SVN revision 8692). When the subimage dimensions are 256x256, "BI_PNG" compression is used, with the subimage encoded in PNG32 format (32-bit RGBA PNG pixels), only if image->compression is UndefinedCompression or ZipCompression.