Page 1 of 1

Alpha channel is reversed when creating ICO files

Posted: 2008-10-01T21:13:24-07:00
by SharkD
There is a problem with alpha channels when creating ICO files. The alpha channels are being reversed. The problem is discussed in this thread, starting with the 8th post. In particular, see anthony's post on page 2, as he has created a test case. I'll quote him here:
anthony wrote:If it is then yes. With (small) examples if posible,

Idealy something like

Code: Select all

   convert image.png ico:- |
             compare -metric PNE   ico:-  image.png null:
Should return '0' as in there are no color differences between a PNG and a ICO image.

However that does not gurantte the image, as it only checks a write and read, reproduces the original image exactly. As such a quick eyeball look may still be needed. But it does provide a quick automated check that the format is working reasonably well.

My own test shows the images are totally different, and a eyeball test...

Code: Select all

 convert image.png ico:- |   display ico:-
shows the write-read cycle has indeed inverted the alpha on my IM v6.4.4-2 svn build.
I wasn't able to follow the instruction he gave in this post, as I am not that great of an IM guru.