Prev | Current Page 196 | Next

Craig Grannell

"The Essential Guide to CSS and HTML Web Design"

The second
image (2) shows the effects of diffusion dithering; the third (3), pattern; and the fourth (4),
noise.
WORKING WITH IMAGES
127
4
1 2 3 4
GIF89: The transparent GIF
The GIF89 file format is identical to GIF, with one important exception: you can remove
colors, which provides a very basic means of transparency and enables the background to
show through. Because this is not alpha transparency (a type of transparency that enables
a smooth transition from solid to transparent, allowing for many levels of opacity), it doesn??™t
work in the way many graphic designers expect. You cannot, for instance, fade an
image??™s background from color to transparent and expect the web page??™s background to
show through??”instead, GIF89??™s transparency is akin to cutting a hole with a pair of scissors:
the background shows through the removed colors only. This is fine when the ???hole???
has flat horizontal or vertical edges. But if you try this with irregular shapes??”such as in the
following image of the cloud with drop shadow??”you??™ll end up with ragged edges. In the
example, the idea was to have the cloud casting a shadow onto the gray background.
However, because GIFs can??™t deal with alpha transparency, we instead end up with an
unwanted white outline. (One way around this is to export the image with the same background
color as that of the web page, but this is only possible if the web page??™s
background is a plain, flat color.


Pages:
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208