3.9 The GIF Encoder
The GIF encoder is used in the export module to generate GIF files for structure charts. The Graphics Interchange Format © (GIF) [GIF90] is the copyright property of CompuServe Incorporated ©. The GIF format uses the Lempel-Zev-Welch (LZW) [NEL89] compression to encode a single image (GIF87a) or sets of images (GIF89a). The compression is lossless and the image is limited to a maximum of 256 colours (8-bit).
The GIF format is used to encode the structure charts for the following reasons:
The GIF encoder uses the palette table and the colour-indexed image to encode the GIF file. There are basically two parts in the encoder, namely the GIF writer module and the LZW encoder module. The GIF writer module creates the GIF header, logical screen descriptor, global colour table, image descriptor, trailer and invokes the LZW encoder to generate the encoded image data. A logical screen descriptor describes the host’s screen in which the image is to be shown and the global colour table contains the palette of all the image(s). The image descriptor describes the image’s properties like width and height.
Figure 34. GIF Encoder.