How Does an Animated GIF File Work?
Series of GIFs
A series of images are created, each slightly different from the one before, similar to the way animated cartoons are created. For example, in an animated GIF file of a cow lifting its head and mooing, the first image may have the cow's head down with its mouth closed, while the second image will have the cow's head up slightly from the ground and the mouth beginning to open slightly. Additional images are created showing the series of the intended movement.
The series of GIFs are put in order and layered one on top of the other in a photo or illustration editing program. They are layered in reverse order with the last image on top. At this point the animated GIF is similar to a cartoon flip-book. If the images were on paper instead of on the screen, you could quickly flip through them and see the motion.
Speed and Loop Are Set
The final part of making an animated GIF work is setting the speed of the animation and whether or not it will loop, or repeat. The speed determines how fast each frame or image appears and will determine whether or not the viewer's brain is tricked into believing the animation is one smooth motion and not a series of images. Loop determines whether or not the entire series of images will repeat after the last image is shown.