Re: transparent gif's

Paul Ramsey ([email protected])
Tue, 30 May 1995 13:17:22 +0500


> Hello. I have a question about using transparent gif's with netscape's
> backgrounds. How come these gif's aren't transparent? If I don't use a
> background on the page, the gif is transpaernt. But if I do use a
> background, there seems to be a black hue around the image. Any ideas?

This is because the image was antialiased against a particular background
color. That means that some of the pixels have a color which is partway
between the foreground color and the background color. For instance if you
had a red circle on a black background there would be pixels that were part
of the way between red and black producing a dark red. This looks great on
a black background but on a white background the circle looks like it has a
dark halo around it.

You will need to choose the background you are going to use before you create
your image if you want it to use antialiasing. Otherwise just use hard edges
and the image won't look quite as bad with arbitrary backgrounds.

Paul Ramsey