Debian Codegraph @

doc/gifbuild.html

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>gifbuild</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /></head><body><div class="refentry"><a id="gifbuild.1"></a><div class="titlepage"></div><div class="refnamediv"><a id="name"></a><h2>Name</h2><p>gifbuild — dump GIF data in a textual format, or undump it to a GIF</p></div><div class="refsynopsisdiv"><a id="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">gifbuild</code> [-v] [-a] [-d] [-t <em class="replaceable"><code>translation-table</code></em>] [-h] [<em class="replaceable"><code>gif-file</code></em>]</p></div></div><div class="refsect1"><a id="id1337"></a><h2>Options</h2><p>A program to convert a series of editable text GIF icon specifications and
3 named GIF files into a multi-image GIF, usable as a graphic resource file.
4 It can also dump existing GIFs in this format. Both directions are
5 lossless and mutually inverse.</p><p>When dumping a GIF, certain sanity checks are performed which
6 may result in a warning emitted to standard error.</p><p>If no GIF file is given, gifbuild will try to read a text input
7 from stdin.</p></div><div class="refsect1"><a id="id1338"></a><h2>Specification Syntax</h2><p>Here is a syntax summary in informal BNF. The token `NL' represents a
8 required newline.</p><pre class="programlisting">
9 &lt;gif-spec&gt; ::= &lt;header-block&gt; &lt;image-block&gt;...
10
11 &lt;header-block&gt; ::= &lt;header-declaration&gt;...
12
13 &lt;header-declaration ::=
14 | screen width &lt;digits&gt; NL
15 | screen height &lt;digits&gt; NL
16 | screen colors &lt;digits&gt; NL
17 | screen background &lt;digits&gt; NL
18 | pixel aspect byte &lt;digits&gt; NL
19 | screen map &lt;color-table&gt; NL
20
21 &lt;color-table&gt; ::= &lt;color-declaration&gt;... end NL
22
23 &lt;color-declaration&gt; ::= rgb &lt;digits&gt; &lt;digits&gt; &lt;digits&gt; [ is &lt;key&gt;] NL
24 | sort flag {on|off} NL
25
26 &lt;image-block&gt; ::= include &lt;file-name&gt; NL
27 | image NL
28 &lt;image-declaration&gt;...
29 &lt;raster-picture&gt;
30 [ &lt;extension&gt; ]
31
32 &lt;image-declarations&gt; ::= image top &lt;digits&gt; NL
33 | image left &lt;digits&gt; NL
34 | image interlaced NL
35 | image map &lt;color-table&gt; NL
36 | image bits &lt;digits&gt; by &lt;digits&gt; [hex|ascii] NL &lt;raster-block&gt;
37
38 &lt;extension&gt; := &lt;comment&gt; NL &lt;extension-block&gt; NL end NL
39 | &lt;plaintext&gt; NL &lt;extension-block&gt; NL end NL
40 | graphics control NL &lt;GCB-part&gt; NL end NL
41 | netscape loop &lt;digits&gt; NL
42 | extension &lt;hex-digits&gt; NL &lt;extension-block&gt; NL end NL
43
44 &lt;GCB-part&gt; ::= disposal mode &lt;digits&gt; NL
45 | user input flag {on|off} NL
46 | delay &lt;digits&gt; NL
47 | transparent index &lt;digits&gt; NL
48
49 </pre><p>If the data types of the <span class="quote">“<span class="quote">screen height</span>”</span>,
50 <span class="quote">“<span class="quote">screen width</span>”</span>, <span class="quote">“<span class="quote">screen background</span>”</span>,
51 <span class="quote">“<span class="quote">image top</span>”</span>, and <span class="quote">“<span class="quote">image left</span>”</span> declarations
52 aren't obvious to you, what are you doing with this software?</p><p>The <span class="quote">“<span class="quote">pixel aspect byte</span>”</span> declaration sets an integer
53 denominator for a fraction expressing the pixel aspect ratio. See the
54 GIF standard for details; this field is actually long obsolete.</p><p>A color table declares color indices (in ascending order from 0)
55 and may associate them with key characters (these associations are
56 absent when the map is more than 94 colors lang and raster blocks
57 using it must use hex pairs). These characters can later be used in
58 raster blocks. As these must be printable and non-whitespace, you can
59 only specify 94 colors per icon. Life is like that sometimes.</p><p>A color table declaration can also set the table's sort flag with
60 "sort flag on" or "sort flag off" on any line before the end.</p><p>An <span class="quote">“<span class="quote">ascii</span>”</span> raster block is just a block of key
61 characters (used for a color map of 94 or fewer colors). A
62 <span class="quote">“<span class="quote">hex</span>”</span> raster block uses hex digit pairs instead (used for
63 a color map with more than 94 colors). The default is ASCII. It
64 should be sized correctly for the <span class="quote">“<span class="quote">image bits</span>”</span>
65 declaration that leads it. Raster blocks from interlaced GIFs are
66 dumped with the lines in non-interlaced order.</p><p>The <span class="quote">“<span class="quote">comment</span>”</span>, <span class="quote">“<span class="quote">plaintext</span>”</span> or
67 <span class="quote">“<span class="quote">graphics control</span>”</span> keywords lead defined GIF89 extension
68 record data. The final GIF89 type, graphics control and application
69 block, are not yet supported, but the code does recognize a Netscape
70 loop block. You can also say <span class="quote">“<span class="quote">extension</span>”</span> followed by a
71 hexadecimal record type. All of these extension declarations must be
72 followed by an extension block, which is terminated by the keyword
73 <span class="quote">“<span class="quote">end</span>”</span> on its own line.</p><p>An extension block is a series of text lines, each interpreted
74 as a string of bytes to fill an extension block (the terminating
75 newline is stripped). Text may include standard C-style octal and hex
76 escapes preceded by a backslash.</p><p>A graphics control block declaration creates a graphics control
77 extension block; for the field semantics see the GIF89 standard, part
78 23.</p><p>A netscape loop declaration creates an application extension
79 block containing a NETSCAPE 2.0 animation loop control with a
80 specified repeat count (repeat count 0 means loop forever). This must
81 be immediately after the header declaration. These loop blocks are
82 interpreted by the Netscape/Mozilla/Firefox line of browsers.</p><p>All &lt;digits&gt; tokens are interpreted as decimal numerals;
83 &lt;hex-digits&gt; tokens are interpreted as two hex digits (a byte). All
84 coordinates are zero-origin with the top left corner (0,0). Range
85 checking is weak and signedness checking nonexistent; caveat
86 hacker!</p><p>In general, the amount of whitespace and order of declarations within a
87 header or image block is not significant, except that a raster picture
88 must immediately follow its <span class="quote">“<span class="quote">image bits</span>”</span> bits declaration.</p><p>The <span class="quote">“<span class="quote">include</span>”</span> declaration includes a named GIF as
89 the next image. The global color maps of included GIFs are merged
90 with the base table defined by any <span class="quote">“<span class="quote">screen color</span>”</span>
91 declaration. All images of an included multi-image GIF will be
92 included in order.</p><p>Comments (preceded with <span class="quote">“<span class="quote">#</span>”</span>) will be ignored.</p></div><div class="refsect1"><a id="id1339"></a><h2>Options</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">-v</span></dt><dd><p>Verbose mode (show progress).
93 Enables printout of running scan lines.</p></dd><dt><span class="term">-d</span></dt><dd><p> Dump the input GIF file(s) into the text form described
94 above.</p></dd><dt><span class="term">-t</span></dt><dd><p>Specify name characters to use when dumping raster blocks. Only
95 valid with -d option.</p></dd><dt><span class="term">-h</span></dt><dd><p>Print one line of command line help, similar to Usage
96 above.</p></dd></dl></div></div><div class="refsect1"><a id="id1340"></a><h2>Bugs</h2><p>Error checking is rudimentary.</p></div><div class="refsect1"><a id="id1341"></a><h2>Example:</h2><p>A sample icon file called <code class="filename">sample.ico</code> is
97 included in the pic directory of the GIFLIB source
98 distribution.</p></div><div class="refsect1"><a id="id1342"></a><h2>Author</h2><p>Eric S. Raymond <code class="email">&lt;<a class="email" href="mailto:[email protected]">[email protected]</a>&gt;</code></p></div></div></body></html>