HTML and CSS Reference
In-Depth Information Interlacing, transparency, and animation
You can make GIF images perform three special tricks: interlacing,
transparency, and animation. With interlacing, a GIF image seemingly
materializes on the display, instead of progressively flowing onto it from
top to bottom. Normally, a GIF-encoded image is a sequence of pixel
data in order, row by row, from the top to the bottom of the image.
While the common GIF image renders onscreen like pulling down a win-
dow shade, interlaced GIFs open like a Venetian blind. That's because
interlacing sequences every fourth row of the image. Users get to see a
full imagetop to bottom, albeit fuzzyin a quarter of the time it takes to
download and display the remainder of the image. The resulting quarter-
done image usually is clear enough so that users with slow network
connections can evaluate whether to take the time to download the re-
mainder of the image file.
Not all graphical browsers, although able to display an interlaced GIF,
are actually able to display the materializing effects of interlacing. With
those that do, users still can defeat the effect by choosing to delay im-
age display until after download and decoding. Older browsers, on the
other hand, always download and decode images before display and
don't support the effect at all.
Another popular effect available with GIF imagesGIF89a-formatted im-
ages, that isis the ability to make a portion of them transparent so that
what's underneath (usually, the browser window's background) shows
through. The transparent GIF image has one color in its color map des-
ignated as the background color. The browser simply ignores any pixel
in the image that uses that background color, thereby letting the dis-
play window's background show through. By carefully cropping its di-
mensions and by using a solid, contiguous background color, you can
make a transparent image seamlessly meld into or float above a page's
surrounding content.
Transparent GIF images are great for any graphic that you want to meld
into the document and not stand out as a rectangular block. Transparent
GIF logos are very popular, as are transparent icons and dingbatsany
graphic that should appear to have an arbitrary, natural shape. You may
Search WWH ::

Custom Search