Aliasing when converting to gif

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
tjak

Aliasing when converting to gif

Post by tjak »

I'm having a hard time converting a batch of ico files to gif. The end result is very aliased. I'm looking for help.

I'm doing a "convert she_user.ico[1] test.gif" and the result is simply no good. A lot of jaggies around the edges. It's a white background with a drawing of a profile of a woman, and the gif contour gets very aliased.

I have tried various filters, quantization etc. to no avail.

When I do a similar conversion to png it looks great. Then if I convert from the png to gif, I get the same ugly result. The gif format has only 256 colors of course, but the thing that troubles me is that I've actually done this before with a nice result. In fact I have an old version of she_user.gif right in front of me that looks perfect.

But I cannot remember how I created the old version, argh! I have to convert a bunch of these and I've wasted hours on this by now trying to remember how I did previously. If someone would be so kind to help, I would appreciate it very much. The file in question is available at http://jchad.mediafreak.org/svn/project ... e_user.ico (though I don't think it has anything to do with that particular file). Could it possibly be related to image transparency?

Thanks in advance.

Best regards,
Thomas
tjak

Re: Aliasing when converting to gif

Post by tjak »

Yesss! I found the answer.

As suspected, the alpha channel was playing games with me. To make the problem go away, I did
"convert she_user.ico[1] -flatten test.gif"

Phew :)
Post Reply