HTML and CSS Reference
In-Depth Information
GIF Images
Graphic interchange format (GIF) is best used for flat line drawings containing solid
tones and simple images such as clip art. The maximum number of colors in a GIF file
is 256 (although most do not use more than the 216 colors in the Web Color Palette).
GIF images have a .gif file extension.
Transparency. The format GIF89A used by GIF images supports image transparency .
In a graphics application such as Adobe Photoshop or Adobe Fireworks one color (usu-
ally the background color) of the image can be set to be transparent. This helps the
image to blend in with the Web page background or table background. Figure 4.5
shows two GIF images, one that does not use transparency and one with a background
color configured to be transparent.
Figure 4.5
Comparison of
nontransparent and
transparent GIFs
When working with transparent GIFs you should also be aware of the halo effect —a
fringe of color around parts of the transparent image. Transparent GIFs are usually
optimized for display on a particular background color. Displaying them on a back-
ground other than the type they were designed for can produce the halo effect.
The GIF used in Figure 4.6 was created to display on a light background. When it is
shown on a dark background, the halo of light pixels is noticeable. This halo can only
be fixed by modifying the image in a graphics application such as Adobe Photoshop or
Adobe Fireworks and saving a version that is optimized for display on a dark back-
Figure 4.6
Notice the halo
effect on the dark
Go to the end of the
book for a full color
version of this figure
Animation. Animated GIF images also use the .gif file extension. They are contained
in a GIF file that consists of several images or frames, each of which is slightly different.
When the frames flash on the screen in order, the image appears animated— animated
GIFs can be created in a graphics application such as Adobe Fireworks or Adobe
Search WWH ::

Custom Search