jpayne@68: '\" t jpayne@68: .\" Title: gifbuild jpayne@68: .\" Author: [see the "Author" section] jpayne@68: .\" Generator: DocBook XSL Stylesheets vsnapshot jpayne@68: .\" Date: 2 May 2012 jpayne@68: .\" Manual: GIFLIB Documentation jpayne@68: .\" Source: GIFLIB jpayne@68: .\" Language: English jpayne@68: .\" jpayne@68: .TH "GIFBUILD" "1" "2 May 2012" "GIFLIB" "GIFLIB Documentation" jpayne@68: .\" ----------------------------------------------------------------- jpayne@68: .\" * Define some portability stuff jpayne@68: .\" ----------------------------------------------------------------- jpayne@68: .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ jpayne@68: .\" http://bugs.debian.org/507673 jpayne@68: .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html jpayne@68: .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ jpayne@68: .ie \n(.g .ds Aq \(aq jpayne@68: .el .ds Aq ' jpayne@68: .\" ----------------------------------------------------------------- jpayne@68: .\" * set default formatting jpayne@68: .\" ----------------------------------------------------------------- jpayne@68: .\" disable hyphenation jpayne@68: .nh jpayne@68: .\" disable justification (adjust text to left margin only) jpayne@68: .ad l jpayne@68: .\" ----------------------------------------------------------------- jpayne@68: .\" * MAIN CONTENT STARTS HERE * jpayne@68: .\" ----------------------------------------------------------------- jpayne@68: .SH "NAME" jpayne@68: gifbuild \- dump GIF data in a textual format, or undump it to a GIF jpayne@68: .SH "SYNOPSIS" jpayne@68: .HP \w'\fBgifbuild\fR\ 'u jpayne@68: \fBgifbuild\fR [\-v] [\-a] [\-d] [\-t\ \fItranslation\-table\fR] [\-h] [\fIgif\-file\fR] jpayne@68: .SH "OPTIONS" jpayne@68: .PP jpayne@68: 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\&. When dumping a GIF, certain sanity checks are performed which may result in a warning emitted to standard error\&. jpayne@68: .PP jpayne@68: If no GIF file is given, gifbuild will try to read a text input from stdin\&. jpayne@68: .SH "SPECIFICATION SYNTAX" jpayne@68: .PP jpayne@68: Here is a syntax summary in informal BNF\&. The token `NL\*(Aq represents a required newline\&. jpayne@68: .sp jpayne@68: .if n \{\ jpayne@68: .RS 4 jpayne@68: .\} jpayne@68: .nf jpayne@68: ::= \&.\&.\&. jpayne@68: jpayne@68: ::= \&.\&.\&. jpayne@68: jpayne@68: NL jpayne@68: | screen height NL jpayne@68: | screen colors NL jpayne@68: | screen background NL jpayne@68: | pixel aspect byte NL jpayne@68: | screen map NL jpayne@68: jpayne@68: ::= \&.\&.\&. end NL jpayne@68: jpayne@68: ::= rgb [ is ] NL jpayne@68: | sort flag {on|off} NL jpayne@68: jpayne@68: ::= include NL jpayne@68: | image NL jpayne@68: \&.\&.\&. jpayne@68: jpayne@68: [ ] jpayne@68: jpayne@68: ::= image top NL jpayne@68: | image left NL jpayne@68: | image interlaced NL jpayne@68: | image map NL jpayne@68: | image bits by [hex|ascii] NL jpayne@68: jpayne@68: := NL NL end NL jpayne@68: | NL <extension\-block> NL end NL jpayne@68: | graphics control NL <GCB\-part> NL end NL jpayne@68: | netscape loop <digits> NL jpayne@68: | extension <hex\-digits> NL <extension\-block> NL end NL jpayne@68: jpayne@68: <GCB\-part> ::= disposal mode <digits> NL jpayne@68: | user input flag {on|off} NL jpayne@68: | delay <digits> NL jpayne@68: | transparent index <digits> NL jpayne@68: jpayne@68: .fi jpayne@68: .if n \{\ jpayne@68: .RE jpayne@68: .\} jpayne@68: .PP jpayne@68: If the data types of the jpayne@68: \(lqscreen height\(rq, jpayne@68: \(lqscreen width\(rq, jpayne@68: \(lqscreen background\(rq, jpayne@68: \(lqimage top\(rq, and jpayne@68: \(lqimage left\(rq jpayne@68: declarations aren\*(Aqt obvious to you, what are you doing with this software? jpayne@68: .PP jpayne@68: The jpayne@68: \(lqpixel aspect byte\(rq jpayne@68: 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\&. jpayne@68: .PP jpayne@68: 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\&. jpayne@68: .PP jpayne@68: 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\&. jpayne@68: .PP jpayne@68: An jpayne@68: \(lqascii\(rq jpayne@68: raster block is just a block of key characters (used for a color map of 94 or fewer colors)\&. A jpayne@68: \(lqhex\(rq jpayne@68: 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 jpayne@68: \(lqimage bits\(rq jpayne@68: declaration that leads it\&. Raster blocks from interlaced GIFs are dumped with the lines in non\-interlaced order\&. jpayne@68: .PP jpayne@68: The jpayne@68: \(lqcomment\(rq, jpayne@68: \(lqplaintext\(rq jpayne@68: or jpayne@68: \(lqggraphics control\(rq jpayne@68: keywords lead defined GIF89 extension record data\&. The final GIF89 type, graphics control and application block, are not yet supported, but the code does recognize a Netscape loop block\&. You can also say jpayne@68: \(lqextension\(rq jpayne@68: followed by a hexadecimal record type\&. All of these extension declarations must be followed by an extension block, which is terminated by the keyword jpayne@68: \(lqend\(rq jpayne@68: on its own line\&. jpayne@68: .PP jpayne@68: 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\&. jpayne@68: .PP jpayne@68: A graphics control block declaration creates a graphics control extension block; for the field semantics see the GIF89 standard, part 23\&. jpayne@68: .PP jpayne@68: 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\&. jpayne@68: .PP jpayne@68: 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! jpayne@68: .PP jpayne@68: 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 jpayne@68: \(lqimage bits\(rq jpayne@68: bits declaration\&. jpayne@68: .PP jpayne@68: The jpayne@68: \(lqinclude\(rq jpayne@68: 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 jpayne@68: \(lqscreen color\(rq jpayne@68: declaration\&. All images of an included multi\-image GIF will be included in order\&. jpayne@68: .PP jpayne@68: Comments (preceded with jpayne@68: \(lq#\(rq) will be ignored\&. jpayne@68: .SH "OPTIONS" jpayne@68: .PP jpayne@68: \-v jpayne@68: .RS 4 jpayne@68: Verbose mode (show progress)\&. Enables printout of running scan lines\&. jpayne@68: .RE jpayne@68: .PP jpayne@68: \-d jpayne@68: .RS 4 jpayne@68: Dump the input GIF file(s) into the text form described above\&. jpayne@68: .RE jpayne@68: .PP jpayne@68: \-t jpayne@68: .RS 4 jpayne@68: Specify name characters to use when dumping raster blocks\&. Only valid with \-d option\&. jpayne@68: .RE jpayne@68: .PP jpayne@68: \-h jpayne@68: .RS 4 jpayne@68: Print one line of command line help, similar to Usage above\&. jpayne@68: .RE jpayne@68: .SH "BUGS" jpayne@68: .PP jpayne@68: Error checking is rudimentary\&. jpayne@68: .SH "EXAMPLE:" jpayne@68: .PP jpayne@68: A sample icon file called jpayne@68: sample\&.ico jpayne@68: is included in the pic directory of the GIFLIB source distribution\&. jpayne@68: .SH "AUTHOR" jpayne@68: .PP jpayne@68: Eric S\&. Raymond jpayne@68: <esr@thyrsus\&.com>