GIF Code Fragments

Several code fragments for the GIF format are available:


GIF.H contains the C-language header structures for the GIF image file format.


GIFREAD.C contains six C-language functions that read various data structures stored in GIF 87a- and 89a-format files.


GIFWRITE.C contains a C-language function that writes a GIF header to a file stream.


GIFHEAD.C is C-language code that displays all read information contained within a GIF image file.


GIFCODE.C is a C-language example of several functions that work with GIF images files; gifcode.c reads a GIF image file, decodes the image data, re-encodes it, and writes it out to a second GIF file.


GIFDECOD.C is C-language code that decodes a Lev-Zempel-Welch (LZW)-encoded scan line.


GIFENCOD.C is C-language code that encodes a raw scan line using the Lev-Zempel-Welch (LZW) encoding algorithm.


ENDIANIO.C functions read and write 16- and 32-bit data words in big-endian (Motorola) and little-endian (Intel) format.


ENDIANIO.H is the header file for endianio.c, and must be included in any source modules calling any of the endian I/O functions found in endianio.c.


DATATYPE.H contains data type definitions and directives used to consolidate the data types used in the source modules and to ease the job of porting code to other systems.

Copyright © 1996 O'Reilly & Associates, Inc. All Rights Reserved.

Hosted by uCoz