1GIFBUILD(1)                  GIFLIB Documentation                  GIFBUILD(1)
2
3
4

NAME

6       gifbuild - dump GIF data in a textual format, or undump it to a GIF
7

SYNOPSIS

9       gifbuild [-v] [-a] [-d] [-t translation-table] [-h] [gif-file]
10

OPTIONS

12       A program to convert a series of editable text GIF icon specifications
13       and named GIF files into a multi-image GIF, usable as a graphic
14       resource file. It can also dump existing GIFs in this format. When
15       dumping a GIF, certain sanity checks are performed which may result in
16       a warning emitted to standard error.
17
18       If no GIF file is given, gifbuild will try to read a text input from
19       stdin.
20

SPECIFICATION SYNTAX

22       Here is a syntax summary in informal BNF. The token `NL' represents a
23       required newline.
24
25           <gif-spec> ::= <header-block> <image-block>...
26
27           <header-block> ::= <header-declaration>...
28
29           <header-declaration ::=
30                     | screen width <digits> NL
31                     | screen height <digits> NL
32                     | screen colors <digits> NL
33                     | screen background <digits> NL
34                     | pixel aspect byte <digits> NL
35                     | screen map <color-table> NL
36
37           <color-table> ::= <color-declaration>... end NL
38
39           <color-declaration> ::= rgb <digits> <digits> <digits> [ is <key>] NL
40                           | sort flag {on|off} NL
41
42           <image-block> ::= include <file-name> NL
43                     | image NL
44                          <image-declaration>...
45                          <raster-picture>
46                          [ <extension> ]
47
48           <image-declarations> ::= image top <digits> NL
49                          | image left <digits> NL
50                          | image interlaced NL
51                          | image map <color-table> NL
52                          | image bits <digits> by <digits> [hex|ascii] NL <raster-block>
53
54           <extension> := <comment> NL <extension-block> NL end NL
55                     | <plaintext> NL <extension-block> NL end NL
56                           | graphics control NL <GCB-part> NL end NL
57                           | netscape loop  <digits> NL
58                     | extension <hex-digits> NL <extension-block> NL end NL
59
60           <GCB-part> ::= disposal mode <digits> NL
61                           | user input flag {on|off} NL
62                           | delay <digits> NL
63                           | transparent index <digits> NL
64
65
66       If the data types of the “screen height”, “screen width”, “screen
67       background”, “image top”, and “image left” declarations aren't obvious
68       to you, what are you doing with this software?
69
70       The “pixel aspect byte” declaration sets an integer denominator for a
71       fraction expressing the puxel aspect ratio. See the GIF standard for
72       details; this field is actually long obsolete.
73
74       A color table declares color indices (in ascending order from 0) and
75       may associate them with key characters (these associations are absent
76       when the map is more than 94 colors lang and raster blocks using it
77       must use hex pairs). These characters can later be used in raster
78       blocks. As these must be printable and non-whitespace, you can only
79       specify 94 colors per icon. Life is like that sometimes.
80
81       A color table declaration can also set the table's sort flag with "sort
82       flag on" or "sort flag off" on any line before the end.
83
84       An “ascii” raster block is just a block of key characters (used for a
85       color map of 94 or fewer colors). A “hex” raster block uses hex digit
86       pairs instead (used for a color map with more than 94 colors). The
87       default is ASCII. It should be sized correctly for the “image bits”
88       declaration that leads it. Raster blocks from interlaced GIFs are
89       dumped with the lines in non-interlaced order.
90
91       The “comment”, “plaintext” or “ggraphics control” keywords lead defined
92       GIF89 extension record data. The final GIF89 type, graphics control and
93       application block, are not yet supported, but the code does recognize a
94       Netscape loop block. You can also say “extension” followed by a
95       hexadecimal record type. All of these extension declarations must be
96       followed by an extension block, which is terminated by the keyword
97       “end” on its own line.
98
99       An extension block is a series of text lines, each interpreted as a
100       string of bytes to fill an extension block (the terminating newline is
101       stripped). Text may include standard C-style octal and hex escapes
102       preceded by a backslash.
103
104       A graphics control block declaration creates a graphics control
105       extension block; for the field semantics see the GIF89 standard, part
106       23.
107
108       A netscape loop declaration creates an application extension block
109       containing a NETSCAPE 2.0 animation loop control with a specified
110       repeat count (repeat count 0 means loop forever). This must be
111       immediately after the header declaration. These loop blocks are
112       interpreted by the Netscape/Mozilla/Firefox line of browsers.
113
114       All <digits> tokens are interpreted as decimal numerals; <hex-digits>
115       tokens are interpreted as two hex digits (a byte). All coordinates are
116       zero-origin with the top left corner (0,0). Range checking is weak and
117       signedness checking nonexistent; caveat hacker!
118
119       In general, the amount of whitespace and order of declarations within a
120       header or image block is not significant, except that a raster picture
121       must immediately follow its “image bits” bits declaration.
122
123       The “include” declaration includes a named GIF as the next image. The
124       global color maps of included GIFs are merged with the base table
125       defined by any “screen color” declaration. All images of an included
126       multi-image GIF will be included in order.
127
128       Comments (preceded with “#”) will be ignored.
129

OPTIONS

131       -v
132           Verbose mode (show progress). Enables printout of running scan
133           lines.
134
135       -d
136           Dump the input GIF file(s) into the text form described above.
137
138       -t
139           Specify name characters to use when dumping raster blocks. Only
140           valid with -d option.
141
142       -h
143           Print one line of command line help, similar to Usage above.
144

BUGS

146       Error checking is rudimentary.
147

EXAMPLE:

149       A sample icon file called sample.ico is included in the pic directory
150       of the GIFLIB source distribution.
151

AUTHOR

153       Eric S. Raymond <esr@thyrsus.com>
154
155
156
157GIFLIB                            2 May 2012                       GIFBUILD(1)
Impressum