DvmGif
A GIF89 file contains a sequence of images. The file contains a sequence header, an optional sequence color table, and one or more images. Each image consists of an image header, an optional private color table, and the colormapped image data. Note that this figure shows a simplified model of the GIF format -- see the GIF standard for a more detailed description of the structures and their fields and values.
The GIF image structural components are:
- Sequence Header -- the (required) GIF sequence header. In Dali, this is represented by the GifSeqHdr abstraction, which is a combination of the GIF standard's Header (section 17 of the standard) and Logical Screen Descriptor (section 18). It contains information (e.g., the width and height of the window needed to display the sequence) about the sequence of images encoded in the GIF file.
- Global Color Table -- the (optional) global color table for the sequence. GIF color tables are implemented using three Dalí ImageMaps (one ImageMap for each of the red, green, and blue tables). This color table is used for every image in the sequence unless that image has a private color table defined (the
img_ct
structure in the figure). The global color table is only present if the value of thect_flag
in the sequence header is 1.- Image Header -- the (required) image header. In Dali, this is represented by the GifImgHdr abstraction, which is a combination of the GIF standard's Image Descriptor (section 20) and Graphic Control Extension (section 23). It contains information about the image that follows (e.g., its width and height, how long it should be displayed on the screen, the transparent color, whether or not a private color table is defined for this image, etc.)
- Local Color Table -- the (optional) private color table for this image. This color table is used only for the image data that follows. This component is represented using three Dalí ImageMaps. A private color table is present only if the value of the
ct_flag
in the image header is 1.img_data
is the colormapped image data. This data is represented using a single Dalí ByteImage.Note:GifImgParse and GifImgEncode currently use global variables and will not work over multiple threads.
Tcl specification
C API specification
Decode a GIF to a series of PPM images [ C | Tcl ]
Encode a PPM as a GIF [ C | Tcl ]
Encode a sequence of PPMs an an animated GIF [ C | Tcl ]
Last Updated :
Copyright © 1997-1998 by Cornell University. See the file license.txt for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.