Chapter 23. Animated GIFs
These days, it's just about impossible to browse the Web without seeing the flashing, bouncing, and wiggling of GIF animation. The animated GIF is ubiquitous, and there are many good reasons for its popularity.
The only drawbacks to animated GIFs are that they can contain no sound or interactivity (you can't make different parts respond to mouse actions), and they may cause some extra work for the user's hard disk to keep refreshing the images.
23.1. How They Work
Animated GIFs work a lot like traditional cell animation. The file contains a number of frames layered on top of each other. In simple animations, each frame is a complete scene. In more sophisticated animations, the first frame provides the background and subsequent frames just provide the changing portion of the image.
The GIF animation consists of a number of images and a set of instructions that specify the length of delay between frames, as well as other attributes like transparency and palettes.
Copyright © 2002 O'Reilly & Associates. All rights reserved.