Alpha channel is reversed when creating ICO files

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
SharkD
Posts: 35
Joined: 2006-07-30T13:18:31-07:00

Alpha channel is reversed when creating ICO files

Post 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.
Post Reply