Home Products Download Order Contacts

comp.graphics.algorithms

Subject: Re: GIF background: transparency




"[Jongware]" wrote in message
news:447c4d1d$0$31655$e4fe514c@news.xs4all.nl...
> "John Smith" wrote in message
> news:e5hggt$tuj$1@news.al.sw.ericsson.se...
> > The background color in a GIF file is set for the entire file. However
> > each
> > image in that same file can have a different pallette and can have a
> > transparent color set. So, can the background be transparent, or is it
> > always a solid color?
> >
> > (Just because browsers ignore background color, does not mean that their
> > implementation is necessarily correct.)
>
> IIRC the background color should be used whenever the transparency can't
be
> implemented. In days long gone a browser might not be able to display a
GIF
> on top of anything else than a solid color, and would use the bgcolor for
> that.
> So both your own answers are true, for slightly different values of
'true'.
> Note: I also seem to recall vaguely the background color is an RGB value,
> which would prohibit the value 'transparent'.
>
> [Jongware]
>
>
Hi Jongware

Thanks for the quick reply! I lack a knowledge of the history of what is now
a very old spec, but you've helped fill in some blanks.

The Background color is an index into the Global color table, and only valid
of the GCT is present. I get slightly confused here too: The transparent
color is also just an index, but could be an index into a Local color table,
if present, for that image (if I understand CIF89a correctly, which might be
in doubt). If both the background and transparent indices are the same, does
it imply that the background is transparent, or is it just understood these
days that a transparent entry in the image means just that, and the
background is now regarded as a superflous entry?

I take from your reply that the background is now largely superflous, and a
transparent pixel means just that. The difficulty comes in in implementing
Disposal method 2 - restore to background color. What is the background
color in this instance? I have read that web browsers will implement the
background color of the page being viewed, and not take the background color
from the field in the GIF.

I'm just thinking aloud here: I think I've answered my own questions, with
your help.

JS



Reply


View All Messages in comp.graphics.algorithms

path:
GIF background: transparency =>Re: GIF background: transparency =>

Replies:

Copyright 2006 WatermarkFactory.com. All Rights Reserved.