Guy Rutenberg

Keeping track of what I do

Alpha Channel Problems When Creating .ico Files Using ImageMagick

with 3 comments

I’ve tried to use ImageMagick to create .ico files for Open Yahtzee, out of PNGs of various sizes. The command as it should have been:

convert openyahtzee16.png openyahtzee32.png openyahtzee64.png openyahtzee.ico

resulted in the alpha channel being reversed. I’ve used ImageMagick 6.4.0, and I didn’t remember this misbehavior happening in the previous versions.

While this annoyed, and was due to no apparent reason, it could be easily solved using the ImageMagick switches to reverse the alpha channel:

-channel Alpha -negate

So the command that produces a correct .ico file was:

convert openyahtzee16.png openyahtzee32.png openyahtzee64.png -channel Alpha -negate openyahtzee.ico
Share and Enjoy:
  • del.icio.us
  • StumbleUpon
  • Digg
  • Facebook
  • Mixx
  • Google Bookmarks
  • Simpy

Written by Guy

October 5th, 2008 at 6:30 pm

Posted in Tips

Tagged with ,

3 Responses to 'Alpha Channel Problems When Creating .ico Files Using ImageMagick'

Subscribe to comments with RSS or TrackBack to 'Alpha Channel Problems When Creating .ico Files Using ImageMagick'.

  1. Odd. Thanks for posting your solution somewhere for the rest of us to find though, I wouldn’t have figured it out so quickly if you hadn’t.

    Jeroen Hoek

    8 Feb 09 at 11:02

  2. Btw it looks like this issue is fixed in v6.4.9-7

    Kumar

    27 Feb 09 at 08:33

  3. @Kumar, it’s good to know that they fixed it, as this bug/regression was just annoying

    Guy

    27 Feb 09 at 09:08

Leave a Reply