GIF Code Fragments

Several code fragments for the GIF format are available:

gif.h

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

gifread.c

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

gifwrite.c

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

gifhead.c

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

gifcode.c

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

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

gifencod.c

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

endianio.c

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

endianio.h

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

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