O'Reilly logo

Programming Web Graphics with Perl and GNU Softwar by Shawn Wallace

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

GIFscript, an Animation Scripting Language

Most of the documentation that you will find about constructing animated GIFs will start with the suggestion “First get a program like GIFBuilder or GIF Construction Set. Then you’ll be ready to start making animated GIFs. . . .” These are programs that are available primarily for Windows and Macintosh machines, and they typically have a graphical user interface that will allow you to place images in a certain order and adjust the attributes of the various images in the sequence. The value of these programs is that they allow you to represent the layout of the animation file in a succinct, readable form, and they allow you to describe the layout of files in a more abstract form than what is achievable by the Perl scripts we have looked at so far. However, most of these tools still require you to assemble the scenes of the animation by hand, and they do not store the description of the sequence in a form that is separable from the actual image file. That’s where GIFscript comes in.

GIFscript is actually just a syntax and an interpreter that lets you define the sequence of images in a GIF animation as a simple text file. The interpreter is a Perl script that acts as an interface to the ImageMagick routines that do all the image crunching work. We’ll call the text file that describes the animation a frame description file.

A GIFscript frame description file consists of a number of instructions for adding images to an animation and for controlling ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required