1<?xml version="1.0" encoding="ISO-8859-1"?> 2<!DOCTYPE article PUBLIC 3 "-//OASIS//DTD DocBook XML V4.1.2//EN" 4 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ 5<!ENTITY homepage "http://catb.org/~esr/"> 6<!ENTITY email "esr@thyrsus.com"> 7]> 8<article><title>Introduction to GIFLIB</title> 9 10<articleinfo> 11 12<author> 13 <firstname>Eric</firstname> 14 <othername>Steven</othername> 15 <surname>Raymond</surname> 16 <affiliation> 17 <orgname><ulink url="&homepage;"> 18 Thyrsus Enterprises</ulink></orgname> 19 <address> 20 <email>&email;</email> 21 </address> 22 </affiliation> 23</author> 24<copyright> 25 <year>2012</year> 26 <holder role="mailto:&email;">Eric S. Raymond</holder> 27</copyright> 28 29</articleinfo> 30 31<para>GIFLIB is a package of portable tools and library routines for 32working with GIF images.</para> 33 34<para>The Graphics Interchange Format(c) specification is the copyrighted 35property of CompuServe Incorporated. GIF(sm) is a service mark 36property of CompuServe Incorporated.</para> 37 38<para>This package has been released under an X Consortium-like open-source 39license. Use and copy as you see fit. If you make useful changes, 40add new tools, or find and fix bugs, please send your mods to the 41maintainers for general distribution.</para> 42 43<para>The util directory includes programs to clip, rotate, scale, and 44position GIF images. These are no replacement for an interactive graphics 45editor, but they can be very useful for scripted image generation or 46transformation.</para> 47 48<para>The library includes program-callable entry points for reading and writing 49GIF files, an 8x8 utility font for embedding text in GIFs, and an error 50handler. GIF manipulation can be done at a relatively low level by 51sequential I/O (which automatically does/undoes image compression) or at 52a higher level by slurping an entire GIF into allocated core.</para> 53 54<para>This library speaks both GIF87a and GIF89. The differences 55between GIF87 and GIF89 are minor: in the latter, the interpretation 56of some extension block types is defined. The library never needs to 57actually interpret these, but <ulink 58url="giftext.html">giftext</ulink> notices them and there are 59functions in the API to read and modify them.</para> 60 61<sect1><title>Utilities</title> 62 63<para>Here is a summary of the utilities in this package. If you're looking 64at this page through a web browser, each utility name should be a 65hotlink to HTML documentation.</para> 66 67<para>Most utilities have a -v (verbose) option that will cause them to print 68the current input scan line number (counting up) whenever they read 69image input, and will print output image line number (counting down) 70when they dump output. Utilities that only read or write always print 71in increasing order.</para> 72 73<!-- 74Note: the giflib.1 man page is deliberately omitted from the following 75list of references. It's meant to be seen through man(1) only as part 76of a local installation of the tools. 77--> 78 79<sect2><title>Conversion Utilities</title> 80 81<variablelist> 82<varlistentry> 83<term><ulink url="gif2rgb.html">gif2rgb</ulink></term> 84<listitem> 85<para>convert images saved as GIF to 24-bit RGB image(s) or vice-versa</para> 86</listitem> 87</varlistentry> 88</variablelist> 89 90</sect2> 91<sect2><title>Test Pattern Generators</title> 92 93<variablelist> 94<varlistentry> 95<term><ulink url="gifbg.html">gifbg</ulink></term> 96<listitem> 97<para>generate a single-color test pattern GIF</para> 98</listitem> 99</varlistentry> 100<varlistentry> 101<term><ulink url="gifcolor.html">gifcolor</ulink></term> 102<listitem> 103<para>generate color test patterns</para> 104</listitem> 105</varlistentry> 106<varlistentry> 107<term><ulink url="gifwedge.html">gifwedge</ulink></term> 108<listitem> 109<para>create a test GIF image resembling a color monitor test pattern</para> 110</listitem> 111</varlistentry> 112</variablelist> 113 114</sect2> 115<sect2><title>Image Manipulation Components</title> 116 117<variablelist> 118<varlistentry> 119<term><ulink url="gifclrmp.html">gifclrmp</ulink></term> 120<listitem> 121<para>modify GIF image colormaps</para> 122</listitem> 123</varlistentry> 124<varlistentry> 125<term><ulink url="giffix.html">giffix</ulink></term> 126<listitem> 127<para>clumsily attempts to fix truncated GIF images</para> 128</listitem> 129</varlistentry> 130</variablelist> 131 132</sect2> 133<sect2><title>Report Generators</title> 134 135<variablelist> 136<varlistentry> 137<term><ulink url="giftext.html">giftext</ulink></term> 138<listitem> 139<para>print (text only) general information about a GIF</para> 140</listitem> 141</varlistentry> 142<varlistentry> 143<term><ulink url="gifhisto.html">gifhisto</ulink></term> 144<listitem> 145<para>generate color-frequency histogram from a GIF</para> 146</listitem> 147</varlistentry> 148</variablelist> 149 150</sect2> 151<sect2><title>GIF Composition Tools</title> 152 153<variablelist> 154<varlistentry> 155<term><ulink url="gifbuild.html">gifbuild</ulink></term> 156<listitem> 157<para>converter/deconverter to/from an editable text format</para> 158</listitem> 159</varlistentry> 160<varlistentry> 161<term><ulink url="gifecho.html">gifecho</ulink></term> 162<listitem> 163<para>generate GIF images out of regular text in 8x8 font</para> 164</listitem> 165</varlistentry> 166<varlistentry> 167<term><ulink url="gifinto.html">gifinto</ulink></term> 168<listitem> 169<para>end-of-pipe fitting for GIF-processing pipelines</para> 170</listitem> 171</varlistentry> 172<varlistentry> 173<term><ulink url="giftool.html">giftool</ulink></term> 174<listitem> 175<para>GIF transformation tool</para> 176</listitem> 177</varlistentry> 178</variablelist> 179 180</sect2> 181</sect1> 182<sect1><title>Library Functions</title> 183 184<para>The library contains two groups of C functions. One group does 185sequential I/O on the stream-oriented GIF format. The other supports 186grabbing an entire GIF into allocated core, operating on it in core, 187and then writing the modified in-core GIF out to disk.</para> 188 189<para>Unless you are on extremely memory-limited machine, you probably want 190to use the second group.</para> 191 192<para>Detailed documentation on the library entry points is in <ulink 193url="gif_lib.html">gif_lib.html</ulink>.</para> 194 195</sect1> 196<sect1><title>The GIF Standard</title> 197 198<para>The doc subdirectory includes an <ulink 199url="gifstandard/GIF89a.html">HTML presentation of the GIF 200standard</ulink>; an <ulink url="gifstandard/ 201LZW-and-GIF-explained.html">explanation of Lempel-Ziv 202compression</ulink>, and the original flat-ASCII description of <ulink 203url="gifstandard/gif89.txt">GIF89 format</ulink> . For historical 204completeness, we also include a copy of the <ulink 205url="gifstandard/gif87.txt">GIF87 standard.</ulink></para> 206 207<para>You can also read a <ulink url="whatsinagif/index.html"> 208detailed narrative description</ulink> of how GIFs are laid out. It 209clarifies some points on which the standard is obscure.</para> 210 211</sect1> 212<sect1><title>Package Status</title> 213 214<para>GIFLIB's current maintainer is Eric S. Raymond. You can find his home 215page at <ulink url="&homepage;">&homepage;</ulink>.</para> 216 217<para>GIFLIB is not under active development, but bug fixes are being 218accepted.</para> 219 220</sect1> 221</article> 222