'\" t .\" Title: gifbuild .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 2 May 2012 .\" Manual: GIFLIB Documentation .\" Source: GIFLIB .\" Language: English .\" .TH "GIFBUILD" "1" "2 May 2012" "GIFLIB" "GIFLIB Documentation" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" gifbuild \- dump GIF data in a textual format, or undump it to a GIF .SH "SYNOPSIS" .HP \w'\fBgifbuild\fR\ 'u \fBgifbuild\fR [\-v] [\-a] [\-d] [\-t\ \fItranslation\-table\fR] [\-h] [\fIgif\-file\fR] .SH "OPTIONS" .PP A program to convert a series of editable text GIF icon specifications and named GIF files into a multi\-image GIF, usable as a graphic resource file\&. It can also dump existing GIFs in this format\&. .PP If no GIF file is given, gifbuild will try to read a text input from stdin\&. .SH "SPECIFICATION SYNTAX" .PP Here is a syntax summary in informal BNF\&. The token `NL\*(Aq represents a required newline\&. .sp .if n \{\ .RS 4 .\} .nf ::= \&.\&.\&. ::= \&.\&.\&. NL | screen height NL | screen colors NL | screen background NL | pixel aspect byte NL | screen map NL ::= \&.\&.\&. end NL ::= rgb [ is ] NL | sort flag {on|off} NL ::= include NL | image NL \&.\&.\&. [ ] ::= image top NL | image left NL | image interlaced NL | image map NL | image bits by [hex|ascii] NL := NL NL end NL | NL <extension\-block> NL end NL | graphics control NL <GCB\-part> NL end NL | netscape loop <digits> NL | extension <hex\-digits> NL <extension\-block> NL end NL <GCB\-part> ::= disposal mode <digits> NL | user input flag {on|off} NL | delay <digits> NL | transparent index <digits> NL .fi .if n \{\ .RE .\} .PP If the data types of the \(lqscreen height\(rq, \(lqscreen width\(rq, \(lqscreen background\(rq, \(lqimage top\(rq, and \(lqimage left\(rq declarations aren\*(Aqt obvious to you, what are you doing with this software? .PP The \(lqpixel aspect byte\(rq declaration sets an integer denominator for a fraction expressing the puxel aspect ratio\&. See the GIF standard for details; this field is actually long obsolete\&. .PP A color table declares color indices (in ascending order from 0) and may associate them with key characters (these associations are absent when the map is more than 94 colors lang and raster blocks using it must use hex pairs)\&. These characters can later be used in raster blocks\&. As these must be printable and non\-whitespace, you can only specify 94 colors per icon\&. Life is like that sometimes\&. .PP A color table declaration can also set the table\*(Aqs sort flag with "sort flag on" or "sort flag off" on any line before the end\&. .PP An \(lqascii\(rq raster block is just a block of key characters (used for a color map of 94 or fewer colors)\&. A \(lqhex\(rq raster block uses hex digit pairs instead (used for a color map with more than 94 colors)\&. The default is ASCII\&. It should be sized correctly for the \(lqimage bits\(rq declaration that leads it\&. Raster blocks from interlaced GIFs are dumped with the lines in non\-interlaced order\&. .PP The \(lqcomment\(rq or \(lqplaintext\(rq keywords lead defined GIF89 extension record data (the other two GIF89 types, graphics control and application block, are not yet supported)\&. You can also say \(lqextension\(rq followed by a hexadecimal record type\&. All of these extension declarations must be followed by an extension block, which is terminated by the keyword \(lqend\(rq on its own line\&. .PP An extension block is a series of text lines, each interpreted as a string of bytes to fill an extension block (the terminating newline is stripped)\&. Text may include standard C\-style octal and hex escapes preceded by a backslash\&. .PP A graphics control block declaration creates a graphics control extension block; for the field semantics see the GIF89 standard, part 23\&. .PP A netscape loop declaration creates an application extension block containing a NETSCAPE 2\&.0 animation loop control with a specified repeat count (repeat count 0 means loop forever)\&. This must be immediately after the header declaration\&. These loop blocks are interpreted by the Netscape/Mozilla/Firefox line of browsers\&. .PP All <digits> tokens are interpreted as decimal numerals; <hex\-digits> tokens are interpreted as two hex digits (a byte)\&. All coordinates are zero\-origin with the top left corner (0,0)\&. Range checking is weak and signedness checking nonexistent; caveat hacker! .PP In general, the amount of whitespace and order of declarations within a header or image block is not significant, except that a raster picture must immediately follow its \(lqimage bits\(rq bits declaration\&. .PP The \(lqinclude\(rq declaration includes a named GIF as the next image\&. The global color maps of included GIFs are merged with the base table defined by any \(lqscreen color\(rq declaration\&. All images of an included multi\-image GIF will be included in order\&. .PP Comments may be preceded with \(lq#\(rq and will be ignored\&. .SH "OPTIONS" .PP \-v .RS 4 Verbose mode (show progress)\&. Enables printout of running scan lines\&. .RE .PP \-d .RS 4 Dump the input GIF file(s) into the text form described above\&. .RE .PP \-t .RS 4 Specify name characters to use when dumping raster blocks\&. Only valid with \-d option\&. .RE .PP \-h .RS 4 Print one line of command line help, similar to Usage above\&. .RE .SH "BUGS" .PP Error checking is rudimentary\&. .SH "EXAMPLE:" .PP A sample icon file called sample\&.ico is included in the pic directory of the GIFLIB source distribution\&. .SH "AUTHOR" .PP Eric S\&. Raymond <esr@thyrsus\&.com>