Debian Codegraph @

doc/gifbuild.1

raw
1 '\" t
2 .\" Title: gifbuild
3 .\" Author: [see the "Author" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 2 May 2012
6 .\" Manual: GIFLIB Documentation
7 .\" Source: GIFLIB
8 .\" Language: English
9 .\"
10 .TH "GIFBUILD" "1" "2 May 2012" "GIFLIB" "GIFLIB Documentation"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 gifbuild \- dump GIF data in a textual format, or undump it to a GIF
32 .SH "SYNOPSIS"
33 .HP \w'\fBgifbuild\fR\ 'u
34 \fBgifbuild\fR [\-v] [\-a] [\-d] [\-t\ \fItranslation\-table\fR] [\-h] [\fIgif\-file\fR]
35 .SH "OPTIONS"
36 .PP
37 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\&. Both directions are lossless and mutually inverse\&.
38 .PP
39 When dumping a GIF, certain sanity checks are performed which may result in a warning emitted to standard error\&.
40 .PP
41 If no GIF file is given, gifbuild will try to read a text input from stdin\&.
42 .SH "SPECIFICATION SYNTAX"
43 .PP
44 Here is a syntax summary in informal BNF\&. The token `NL\*(Aq represents a required newline\&.
45 .sp
46 .if n \{\
47 .RS 4
48 .\}
49 .nf
50 <gif\-spec> ::= <header\-block> <image\-block>\&.\&.\&.
51
52 <header\-block> ::= <header\-declaration>\&.\&.\&.
53
54 <header\-declaration ::=
55 | screen width <digits> NL
56 | screen height <digits> NL
57 | screen colors <digits> NL
58 | screen background <digits> NL
59 | pixel aspect byte <digits> NL
60 | screen map <color\-table> NL
61
62 <color\-table> ::= <color\-declaration>\&.\&.\&. end NL
63
64 <color\-declaration> ::= rgb <digits> <digits> <digits> [ is <key>] NL
65 | sort flag {on|off} NL
66
67 <image\-block> ::= include <file\-name> NL
68 | image NL
69 <image\-declaration>\&.\&.\&.
70 <raster\-picture>
71 [ <extension> ]
72
73 <image\-declarations> ::= image top <digits> NL
74 | image left <digits> NL
75 | image interlaced NL
76 | image map <color\-table> NL
77 | image bits <digits> by <digits> [hex|ascii] NL <raster\-block>
78
79 <extension> := <comment> NL <extension\-block> NL end NL
80 | <plaintext> NL <extension\-block> NL end NL
81 | graphics control NL <GCB\-part> NL end NL
82 | netscape loop <digits> NL
83 | extension <hex\-digits> NL <extension\-block> NL end NL
84
85 <GCB\-part> ::= disposal mode <digits> NL
86 | user input flag {on|off} NL
87 | delay <digits> NL
88 | transparent index <digits> NL
89
90 .fi
91 .if n \{\
92 .RE
93 .\}
94 .PP
95 If the data types of the
96 \(lqscreen height\(rq,
97 \(lqscreen width\(rq,
98 \(lqscreen background\(rq,
99 \(lqimage top\(rq, and
100 \(lqimage left\(rq
101 declarations aren\*(Aqt obvious to you, what are you doing with this software?
102 .PP
103 The
104 \(lqpixel aspect byte\(rq
105 declaration sets an integer denominator for a fraction expressing the pixel aspect ratio\&. See the GIF standard for details; this field is actually long obsolete\&.
106 .PP
107 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\&.
108 .PP
109 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\&.
110 .PP
111 An
112 \(lqascii\(rq
113 raster block is just a block of key characters (used for a color map of 94 or fewer colors)\&. A
114 \(lqhex\(rq
115 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
116 \(lqimage bits\(rq
117 declaration that leads it\&. Raster blocks from interlaced GIFs are dumped with the lines in non\-interlaced order\&.
118 .PP
119 The
120 \(lqcomment\(rq,
121 \(lqplaintext\(rq
122 or
123 \(lqgraphics control\(rq
124 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
125 \(lqextension\(rq
126 followed by a hexadecimal record type\&. All of these extension declarations must be followed by an extension block, which is terminated by the keyword
127 \(lqend\(rq
128 on its own line\&.
129 .PP
130 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\&.
131 .PP
132 A graphics control block declaration creates a graphics control extension block; for the field semantics see the GIF89 standard, part 23\&.
133 .PP
134 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\&.
135 .PP
136 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!
137 .PP
138 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
139 \(lqimage bits\(rq
140 bits declaration\&.
141 .PP
142 The
143 \(lqinclude\(rq
144 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
145 \(lqscreen color\(rq
146 declaration\&. All images of an included multi\-image GIF will be included in order\&.
147 .PP
148 Comments (preceded with
149 \(lq#\(rq) will be ignored\&.
150 .SH "OPTIONS"
151 .PP
152 \-v
153 .RS 4
154 Verbose mode (show progress)\&. Enables printout of running scan lines\&.
155 .RE
156 .PP
157 \-d
158 .RS 4
159 Dump the input GIF file(s) into the text form described above\&.
160 .RE
161 .PP
162 \-t
163 .RS 4
164 Specify name characters to use when dumping raster blocks\&. Only valid with \-d option\&.
165 .RE
166 .PP
167 \-h
168 .RS 4
169 Print one line of command line help, similar to Usage above\&.
170 .RE
171 .SH "BUGS"
172 .PP
173 Error checking is rudimentary\&.
174 .SH "EXAMPLE:"
175 .PP
176 A sample icon file called
177 sample\&.ico
178 is included in the pic directory of the GIFLIB source distribution\&.
179 .SH "AUTHOR"
180 .PP
181 Eric S\&. Raymond
182 <esr@thyrsus\&.com>