transparency of some ico files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
b67

transparency of some ico files

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: transparency of some ico files

Post by fmw42 »

You could try enabling the alpha channel. So for example try

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

Re: transparency of some ico files

Post by b67 »

Nope, still no dice.

Thanks for the suggestion though.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: transparency of some ico files

Post 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
b67

Re: transparency of some ico files

Post by b67 »

Thanks fmw42,

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

worked perfectly!
Post Reply