xref: /aosp_15_r20/external/giflib/doc/giftool.xml (revision 324bb76b8d05e2a05aa88511fff61cf3f9ca5892)
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE refentry PUBLIC
3   "-//OASIS//DTD DocBook XML V4.1.2//EN"
4   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>
5<refentry id='giftool.1'>
6<refentryinfo><date>3 June 2012</date></refentryinfo>
7<refmeta>
8<refentrytitle>giftool</refentrytitle>
9<manvolnum>1</manvolnum>
10<refmiscinfo class="source">GIFLIB</refmiscinfo>
11<refmiscinfo class="manual">GIFLIB Documentation</refmiscinfo>
12</refmeta>
13<refnamediv id='name'>
14<refname>giftool</refname>
15<refpurpose>GIF transformation tool</refpurpose>
16</refnamediv>
17
18<refsynopsisdiv id='synopsis'>
19
20<cmdsynopsis>
21  <command>giftool</command>
22      <arg choice='opt'>-a <replaceable>aspect</replaceable></arg>
23      <arg choice='opt'>-b <replaceable>bgcolor</replaceable></arg>
24      <arg choice='opt'>-d <replaceable>delaytime</replaceable></arg>
25      <arg choice='opt'>-i <replaceable>interlacing</replaceable></arg>
26      <arg choice='opt'>-n <replaceable>imagelist</replaceable></arg>
27      <arg choice='opt'>-p <replaceable>left,top</replaceable></arg>
28      <arg choice='opt'>-s <replaceable>width,height</replaceable></arg>
29      <arg choice='opt'>-t <replaceable>transcolor</replaceable></arg>
30      <arg choice='opt'>-u <replaceable>sort-flag</replaceable></arg>
31      <arg choice='opt'>-x <replaceable>disposal</replaceable></arg>
32      <arg choice='opt'>-z <replaceable>sort-flag</replaceable></arg>
33</cmdsynopsis>
34</refsynopsisdiv>
35
36<refsect1><title>Description</title>
37
38<para>A filter for transforming GIFS. With no options, it's an expensive
39copy of a GIF in standard input to standard output.  Options specify
40filtering operations and are performed in the order specified on the command
41line.</para>
42
43<para>The -n option selects images, allowing the tool to act on a
44subset of images in a multi-image GIF.  This option takes a
45comma-separated list of decimal integers which are interpreted as
461-origin image indices; these are the images that will be acted on.
47If no -n option is specified, the tool will select and transform all
48images.</para>
49
50<para>The -b option takes a decimal integer argument and uses it to
51set the (0-origin) screen background color index.</para>
52
53<para>The -f option accepts a printf-style format string and
54substitutes into it the values of image-descriptor and graphics-control
55fields. The string is formatted and output once for each selected
56image.  Normal C-style escapes \b, \f, \n, \r, \t. \v, and \xNN are
57interpreted; also \e produces ESC (ASCII 0x1b).  The following format
58cookies are substituted:</para>
59
60<variablelist>
61<varlistentry>
62<term>%a</term>
63<listitem><para>Pixel aspect byte.</para></listitem>
64</varlistentry>
65<varlistentry>
66<term>%b</term>
67<listitem><para>Screen background color.</para></listitem>
68</varlistentry>
69<varlistentry>
70<term>%d</term>
71<listitem><para>Image delay time</para></listitem>
72</varlistentry>
73<varlistentry>
74<term>%h</term>
75<listitem><para>Image height (y dimension)</para></listitem>
76</varlistentry>
77<varlistentry>
78<term>%n</term>
79<listitem><para>Image index</para></listitem>
80</varlistentry>
81<varlistentry>
82<term>%p</term>
83<listitem><para>Image position (as an x,y pair)</para></listitem>
84</varlistentry>
85<varlistentry>
86<term>%s</term>
87<listitem><para>Screen size (as an x,y pair)</para></listitem>
88</varlistentry>
89<varlistentry>
90<term>%t</term>
91<listitem><para>Image transparent-color index</para></listitem>
92</varlistentry>
93<varlistentry>
94<term>%u</term>
95<listitem><para>Image user-input flag (boolean)</para></listitem>
96</varlistentry>
97<varlistentry>
98<term>%v</term>
99<listitem><para>GIF version string</para></listitem>
100</varlistentry>
101<varlistentry>
102<term>%w</term>
103<listitem><para>Image width (x dimension)</para></listitem>
104</varlistentry>
105<varlistentry>
106<term>%x</term>
107<listitem><para>Image GIF89 disposal mode</para></listitem>
108</varlistentry>
109<varlistentry>
110<term>%z</term>
111<listitem><para>Image's color table sort flag (boolean,
112false if no local color map)</para></listitem>
113</varlistentry>
114</variablelist>
115
116<para>Boolean substitutions may take a prefix to modify how they are
117displayed:</para>
118
119<variablelist>
120<varlistentry>
121<term>1</term>
122<listitem><para>"1" or "0"</para></listitem>
123</varlistentry>
124<varlistentry>
125<term>o</term>
126<listitem><para>"on" or "off"</para></listitem>
127</varlistentry>
128<varlistentry>
129<term>t</term>
130<listitem><para>"t" or "f"</para></listitem>
131</varlistentry>
132<varlistentry>
133<term>y</term>
134<listitem><para>"yes" or "no"</para></listitem>
135</varlistentry>
136</variablelist>
137
138<para>Thus, for example, "%oz" displays image sort flags using the
139strings "on" and "off". The default with no prefix is numeric.</para>
140
141<para>The -a option takes an unsigned decimal integer argument and
142uses it to set the aspect-ratio bye in the logical screen descriptor
143block.</para>
144
145<para>The -b option takes an unsigned decimal integer argument and
146uses it to set the background color index in the logical screen
147descriptor block.</para>
148
149<para>The -d option takes a decimal integer argument and uses it to set a delay
150time, in hundredths of a second, on selected images.</para>
151
152<para>The -i option sets or clears interlaccing in selected images. Acceptable arguments are "1", "0", "yes", "no", "on", "off", "t", "f"</para>
153
154<para>The -p option takes a (0-origin) x,y coordinate-pair and sets it
155as the preferred upper-left-corner coordinates of selected
156images.</para>
157
158<para>The -s option takes a (0-origin) x,y coordinate-pair and sets it
159as the expected display screen size.</para>
160
161<para>The -t option takes a decimal integer argument and uses it to set the
162(0-origin) index of the transparency color in selected images.</para>
163
164<para>The -u option sets or clears the user-input flag in selected
165images.  Acceptable arguments are "1", "0", "yes", "no", "on", "off",
166"t", "f".</para>
167
168<para>The -x option takes a decimal integer argument and uses it to set the
169GIF89 disposal mode in selected images.</para>
170
171<para>The -z option sets or clears the color-table sort flag in
172selected images.  Acceptable arguments are "1", "0", "yes", "no",
173"on", "off", "t", "f".</para>
174
175<para>Note that the -a, -b, -p, -s, and -z options are included to
176complete the ability to modify all fields defined in the GIF standard,
177but should have no effect on how an image renders on browsers or
178modern viewers.</para>
179
180</refsect1>
181<refsect1><title>Author</title>
182
183<para>Eric S. Raymond.</para>
184
185</refsect1>
186</refentry>
187
188