Gif transparency problem

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
mobius

Gif transparency problem

Post by mobius »

Hi,

I'm trying to make the white background on a gif image transparent using:

convert -fuzz 50% -transparent white p2.gif t2.gif

This seems to work most of the time but gives incorrect results if the top left corner of the image is not also white. Tried versions 6.0.6 and 5.4.7 with the same results.

Example input image that fails:
http://www.daveb.ukshells.co.uk/p1.gif

Example that works:
http://www.daveb.ukshells.co.uk/p2.gif

Please let me know what I'm doing wrong as this has been slowly driving me made over the past 5 years!

Cheers,
Dave
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Gif transparency problem

Post by magick »

Try reducing your fuzz factor from 50% to 5%. If that fails, upgrade. We tried your command with ImageMagick 6.3.7-0, the current release and it worked fine for p1.gif and p2.gif.
mobius

Re: Gif transparency problem

Post by mobius »

Thanks for looking into this for me.

Tried reducing the fuzz to 5% but this didn't help.
Tried updating to 6.2.4 (the latest version available from stable Debian Sarge).
Also tried this from RH9, Debian 3.1 & Debian 4.0 all with the same result.

Example output:
http://www.daveb.ukshells.co.uk/t1.gif

I downloaded binaries for IM 6.3 but I don't have the dependencies (tiff libs etc.)

All I want to do is overlay this image on a map gif. Is there a different approach that I could use.
Post Reply