Page 1 of 1

transparency of some ico files

Posted: 2008-05-04T13:35:24-07:00
by b67
I am having a problem where I seem to lose the transparency of *some* icon files that I am working with (but not all transparent ico files). An example is:

http://files.adbrite.com/mb/images/favicon.ico

If I try to resize (`convert ab.ico -resize 32x32! ab2.ico`), the transparent background turns black.

But if I perform the same operation for a different icon, it works. A working example is:

http://www.shutterfly.com/favicon.ico

I am currently using ImageMagick 6.3.7.

Thanks in advance.

Re: transparency of some ico files

Posted: 2008-05-04T17:36:24-07:00
by fmw42
You could try enabling the alpha channel. So for example try

convert ab.ico -channel RGBA -resize 32x32! ab2.ico

Re: transparency of some ico files

Posted: 2008-05-04T17:51:34-07:00
by b67
Nope, still no dice.

Thanks for the suggestion though.

Re: transparency of some ico files

Posted: 2008-05-04T19:13:33-07:00
by fmw42
check convert ab.ico -verbose info: to see if there is anything strange about the alpha channel or the underlying image colors. (Post an example image of one that does not work.)

you might also try adding -matte or -alpha on

convert ab.ico -alpha on -channel RGBA -resize 32x32! ab2.ico

Re: transparency of some ico files

Posted: 2008-05-04T19:32:52-07:00
by b67
Thanks fmw42,

convert ab.ico -alpha on -channel RGBA -resize 32x32! ab2.ico

worked perfectly!