Introduction to GIFLIB

GIFLIB is a package of portable tools and library routines for working with GIF images. GIFLIB is no longer maintained, but you can find the latest version of libregif at http://armory.nicewarrior.org/projects/libregif.

The Graphics Interchange Format(c) specification is the copyrighted property of CompuServe Incorporated. GIF(sm) is a service mark property of CompuServe Incorporated. As this package existed before UniSys's lawyeritis attack of New Years' Day 1995, it is grandfathered in under their license terms and you do not have to pay fees for using it.

This package has been released under an X Consortium-life freeware license. Use and copy as you see fit. If you make useful changes, add new tools, or find and fix bugs, please send your mods to the maintainers for general distribution.

The library includes program-callable entry points for reading and writing GIF files, an 8x8 utility font for embedding text in GIFs, and an error handler. GIF manipulation can be done at a relatively low level by sequential I/O (which automatically does/undoes image compression) or at a higher level by slurping an entire GIF into allocated core.

This library speaks both GIF87a and GIF89. The differences between GIF87 and GIF89 are minor: in the latter, the interpretation of some extension block types is defined. The library never needs to actually interpret these.

Library Functions

The library contains two groups of C functions. One group does sequential I/O on the stream-oriented GIF format. The other supports grabbing an entire GIF into allocated core, operating on it in core, and then writing the modified in-core GIF out to disk.

Unless you are on a 286 or some other very memory-limited machine running under DOS, you probably want to use the second group.

Detailed documentation on the library entry points is in gif_lib.html. Library error codes are described in liberror.html

The GIF Standard

The doc subdurector includes flat-ASCII descriptions of GIF89 format and Lempel-Ziv Compression.

History

This package was originally written by Gershon Elber in 1990 on an IBM PC under MS-DOS using Borland Turbo C. He made it portable to several UNIX environments.

The 2.1 version featured substantial changes and additions by Eric S. Raymond <esr@snark.thyrsus.com>. These included the DGifSlurp/EGifSpew function pair for enabling non-sequential operations on GIF images and the tools icon2gif, gifovly, gifburst, and gifcompose.

The 2.4 version converted all the docs from an idiosyncratic plain-text formal to to HTML.

Then some time after libungif 4.0 stopped being maintained, Joey Parrish <joey@nicewarrior.org> threw together patches from various distros' libungif packages and dug up an old version of libgif 3.0 from which to yank lzw compression code. He called the result libregif. Two years and much MPlayer later, he finally released it.

Package Status

GIFLIB is no longer maintained. libregif is maintained at http://armory.nicewarrior.org/projects/libregif.

libregif is not under active development, but bug fixes are always welcome.


Joey Parrish <joey@nicewarrior.org>