PM wrote:
Hello,
I feel silly for asking this, as I know I've learned this before, but I've forgotten how to do this. I need to move a gif with transparent background (assuming a white background, the color graduates to white along the edges) to a background color other than white. How do I get it to avoid looking crappy with the whiteness showing up after the move to the new color?
This is not directly possible, unfortunately, because GIF supports an all or nothing transparency. This is one of the reasons you seldom see drop shadows for a gif image. Here are some common workarounds:
1) make your gif with pixel accurate edges, instead of relying on a matte color. You may see jaggies with this method, but at least there will be no white edges.
2) us a large number of gif images, with different edge color combinations, and change the gif according to the location on the page.
3) If the image has inherrently soft edges, e.g. a cloud, dither the edges of your image instead of fading it to the matte color.
4) use a png image instead of gif. Png supports a true alpha channel. The drawback is that some browsers ain't got a thing cuz they don't got that PNG.
None of these is a perfect solution - but at least now you know why web animations against a gradient background are so rare.
--
Mike Russell
www.curvemeister.com
www.geigy.2y.net