image_compressor_pack 1.0.0.1-universal-darwin-16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +22 -0
  3. data/lib/.paths.yml +12 -0
  4. data/lib/image_compressor_pack/dynamically_linked_recipes.yml +102 -0
  5. data/lib/image_compressor_pack/recipes.rb +42 -0
  6. data/lib/image_compressor_pack/statically_linked_recipes.yml +109 -0
  7. data/lib/image_compressor_pack/version.rb +3 -0
  8. data/lib/image_compressor_pack.rb +24 -0
  9. data/ports/advancecomp-1.22-x86_64-apple-darwin16.1.0.installed +0 -0
  10. data/ports/gifsicle-1.88-x86_64-apple-darwin16.1.0.installed +0 -0
  11. data/ports/jhead-3.0-x86_64-apple-darwin16.1.0.installed +0 -0
  12. data/ports/jpeg-archive-2.1.1-x86_64-apple-darwin16.1.0.installed +0 -0
  13. data/ports/jpegoptim-1.4.4-x86_64-apple-darwin16.1.0.installed +0 -0
  14. data/ports/lcms2-2.8-x86_64-apple-darwin16.1.0.installed +0 -0
  15. data/ports/libpng-1.6.26-x86_64-apple-darwin16.1.0.installed +0 -0
  16. data/ports/mozjpeg-3.1-x86_64-apple-darwin16.1.0.installed +0 -0
  17. data/ports/nasm-2.12.02-x86_64-apple-darwin16.1.0.installed +0 -0
  18. data/ports/optipng-0.7.6-x86_64-apple-darwin16.1.0.installed +0 -0
  19. data/ports/pngcrush-1.8.10-x86_64-apple-darwin16.1.0.installed +0 -0
  20. data/ports/pngquant-2.8.0-x86_64-apple-darwin16.1.0.installed +0 -0
  21. data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/bin/advdef +0 -0
  22. data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/bin/advmng +0 -0
  23. data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/bin/advpng +0 -0
  24. data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/bin/advzip +0 -0
  25. data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/share/man/man1/advdef.1 +83 -0
  26. data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/share/man/man1/advmng.1 +197 -0
  27. data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/share/man/man1/advpng.1 +93 -0
  28. data/ports/x86_64-apple-darwin16.1.0/advancecomp/1.22/share/man/man1/advzip.1 +116 -0
  29. data/ports/x86_64-apple-darwin16.1.0/gifsicle/1.88/bin/gifsicle +0 -0
  30. data/ports/x86_64-apple-darwin16.1.0/gifsicle/1.88/share/man/man1/gifsicle.1 +1318 -0
  31. data/ports/x86_64-apple-darwin16.1.0/jhead/3.0/bin/jhead +0 -0
  32. data/ports/x86_64-apple-darwin16.1.0/jpeg-archive/2.1.1/bin/jpeg-archive +40 -0
  33. data/ports/x86_64-apple-darwin16.1.0/jpeg-archive/2.1.1/bin/jpeg-compare +0 -0
  34. data/ports/x86_64-apple-darwin16.1.0/jpeg-archive/2.1.1/bin/jpeg-hash +0 -0
  35. data/ports/x86_64-apple-darwin16.1.0/jpeg-archive/2.1.1/bin/jpeg-recompress +0 -0
  36. data/ports/x86_64-apple-darwin16.1.0/jpegoptim/1.4.4/bin/jpegoptim +0 -0
  37. data/ports/x86_64-apple-darwin16.1.0/jpegoptim/1.4.4/share/man/man1/jpegoptim.1 +186 -0
  38. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/bin/linkicc +0 -0
  39. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/bin/psicc +0 -0
  40. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/bin/transicc +0 -0
  41. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/include/lcms2.h +1903 -0
  42. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/include/lcms2_plugin.h +665 -0
  43. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/lib/liblcms2.a +0 -0
  44. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/lib/liblcms2.la +41 -0
  45. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/lib/pkgconfig/lcms2.pc +11 -0
  46. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/share/man/man1/jpgicc.1 +122 -0
  47. data/ports/x86_64-apple-darwin16.1.0/lcms2/2.8/share/man/man1/tificc.1 +117 -0
  48. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/libpng16/png.h +3266 -0
  49. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/libpng16/pngconf.h +622 -0
  50. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/libpng16/pnglibconf.h +213 -0
  51. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/png.h +3266 -0
  52. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/pngconf.h +622 -0
  53. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/include/pnglibconf.h +213 -0
  54. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/libpng.a +0 -0
  55. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/libpng.la +41 -0
  56. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/libpng16.a +0 -0
  57. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/libpng16.la +41 -0
  58. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/lib/pkgconfig/libpng16.pc +11 -0
  59. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/share/man/man3/libpng.3 +6179 -0
  60. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/share/man/man3/libpngpf.3 +18 -0
  61. data/ports/x86_64-apple-darwin16.1.0/libpng/1.6.26/share/man/man5/png.5 +74 -0
  62. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/cjpeg +0 -0
  63. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/djpeg +0 -0
  64. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/jpegtran +0 -0
  65. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/rdjpgcom +0 -0
  66. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/tjbench +0 -0
  67. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/bin/wrjpgcom +0 -0
  68. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/jconfig.h +71 -0
  69. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/jerror.h +320 -0
  70. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/jmorecfg.h +390 -0
  71. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/jpeglib.h +1185 -0
  72. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/include/turbojpeg.h +1538 -0
  73. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/lib/libjpeg.a +0 -0
  74. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/lib/libjpeg.la +41 -0
  75. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/lib/libturbojpeg.a +0 -0
  76. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/lib/libturbojpeg.la +41 -0
  77. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/README +281 -0
  78. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/README-mozilla.txt +194 -0
  79. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/README-turbo.txt +363 -0
  80. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/example.c +433 -0
  81. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/libjpeg.txt +3015 -0
  82. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/structure.txt +906 -0
  83. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/usage.txt +649 -0
  84. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/doc/wizard.txt +211 -0
  85. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/cjpeg.1 +352 -0
  86. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/djpeg.1 +278 -0
  87. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/jpegtran.1 +269 -0
  88. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/rdjpgcom.1 +63 -0
  89. data/ports/x86_64-apple-darwin16.1.0/mozjpeg/3.1/share/man/man1/wrjpgcom.1 +103 -0
  90. data/ports/x86_64-apple-darwin16.1.0/nasm/2.12.02/bin/nasm +0 -0
  91. data/ports/x86_64-apple-darwin16.1.0/nasm/2.12.02/bin/ndisasm +0 -0
  92. data/ports/x86_64-apple-darwin16.1.0/nasm/2.12.02/share/man/man1/nasm.1 +429 -0
  93. data/ports/x86_64-apple-darwin16.1.0/nasm/2.12.02/share/man/man1/ndisasm.1 +120 -0
  94. data/ports/x86_64-apple-darwin16.1.0/optipng/0.7.6/bin/optipng +0 -0
  95. data/ports/x86_64-apple-darwin16.1.0/optipng/0.7.6/man/man1/optipng.1 +343 -0
  96. data/ports/x86_64-apple-darwin16.1.0/pngcrush/1.8.10/bin/pngcrush +0 -0
  97. data/ports/x86_64-apple-darwin16.1.0/pngquant/2.8.0/bin/pngquant +0 -0
  98. data/ports/x86_64-apple-darwin16.1.0/pngquant/2.8.0/share/man/man1/pngquant.1 +127 -0
  99. data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/include/zconf.h +511 -0
  100. data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/include/zlib.h +1768 -0
  101. data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/lib/libz.a +0 -0
  102. data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/lib/pkgconfig/zlib.pc +13 -0
  103. data/ports/x86_64-apple-darwin16.1.0/zlib/1.2.8/share/man/man3/zlib.3 +151 -0
  104. data/ports/zlib-1.2.8-x86_64-apple-darwin16.1.0.installed +0 -0
  105. metadata +219 -0
@@ -0,0 +1,1318 @@
1
+ .\" -*- mode: nroff -*-
2
+ .ds V 1.88
3
+ .ds E " \-\-
4
+ .if t .ds E \(em
5
+ .de Op
6
+ .BR "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
7
+ ..
8
+ .de Oa
9
+ .IR "\fB\\$1\& \|\fI\\$2" "\\$3" "\\$4" "\\$5" "\\$6"
10
+ ..
11
+ .de Qo
12
+ .RB \(oq "\\$1" "\(cq\\$2"
13
+ ..
14
+ .de Qa
15
+ .BI "\fR\(oq\fB\\$1" " \\$2" " \\$3" " \\$4" "\fR\(cq\\$5"
16
+ ..
17
+ .de Sp
18
+ .if n .sp
19
+ .if t .sp 0.4
20
+ ..
21
+ .de Ix
22
+ .TP 25
23
+ \\$1
24
+ .nh
25
+ \\$2
26
+ .hy
27
+ ..
28
+ .de Es
29
+ .Sp
30
+ .RS 5
31
+ .nf
32
+ ..
33
+ .de Ee
34
+ .fi
35
+ .RE
36
+ .PP
37
+ ..
38
+ .de Xs
39
+ .RS 5
40
+ .nf
41
+ ..
42
+ .de Xe
43
+ .fi
44
+ .RE
45
+ ..
46
+ .TH GIFSICLE 1 "5 May 2012" "Version \*V"
47
+ .SH NAME
48
+ gifsicle \- manipulates GIF images and animations
49
+ .SH SYNOPSIS
50
+ .B gifsicle
51
+ \%[options, frames, and filenames].\|.\|.
52
+ '
53
+ .SH DESCRIPTION
54
+ .B gifsicle
55
+ is a powerful command-line program for creating, editing, manipulating, and
56
+ getting information about GIF images and animations.
57
+ .PP
58
+ .B Gifsicle
59
+ normally processes input GIF files according to its command line
60
+ options and writes the result to the standard output. The
61
+ .Op \-i
62
+ option, for example, tells
63
+ .B gifsicle
64
+ to interlace its inputs:
65
+ .Es
66
+ \fBgifsicle \-i < pic.gif > interlaced-pic.gif\fR
67
+ .Ee
68
+ .PP
69
+ .B Gifsicle
70
+ is good at creating and manipulating GIF animations. By default, it
71
+ combines two or more input files into a \(lqflipbook\(rq animation:
72
+ .Es
73
+ \fBgifsicle pic1.gif pic2.gif pic3.gif > animation.gif\fR
74
+ .Ee
75
+ Use options like
76
+ .Op \-\-delay ", " \-\-loopcount ", and " \-\-optimize
77
+ to tune your animations.
78
+ .PP
79
+ To modify GIF files in place, use the
80
+ .Op \-\-batch
81
+ option. With
82
+ .Op \-\-batch ,
83
+ .B gifsicle
84
+ will modify the files you specify instead of writing a new file to the
85
+ standard output. To interlace all the GIFs in the current directory, you
86
+ could say:
87
+ .Es
88
+ \fBgifsicle \-\-batch \-i *.gif
89
+ .Ee
90
+ .PP
91
+ New users may want to skip to
92
+ the Examples section at the end.
93
+ '
94
+ .SH CONCEPT INDEX
95
+ '
96
+ Concepts are on the left, relevant
97
+ .B gifsicle
98
+ options are on the right.
99
+ '
100
+ .Sp
101
+ .PD 0
102
+ .Ix "Animations, changing" "frame selections, frame changes, etc."
103
+ .Ix "\ \ \ disposal" "\fB\-\-disposal\fP"
104
+ .Ix "\ \ \ looping" "\fB\-\-loopcount\fP"
105
+ .Ix "\ \ \ portions of" "frame selections"
106
+ .Ix "\ \ \ smaller" "\fB\-\-optimize\fP, \fB\-\-colors\fP"
107
+ .Ix "\ \ \ speed" "\fB\-\-delay\fP"
108
+ .Ix "Bad output" "\fB\-\-careful\fP"
109
+ .Ix "Background color" "\fB\-\-background\fP"
110
+ .Ix "Colors, changing" "\fB\-\-change\-color\fP, \fB\-\-use\-colormap\fP, \fB\-\-dither\fP, \fB\-\-transform\-colormap\fP"
111
+ .Ix "\ \ \ reducing number" "\fB\-\-colors\fP, \fB\-\-dither\fP, \fB\-\-gamma\fP"
112
+ .Ix "Comments" "\fB\-\-comment\fP"
113
+ .Ix "Extensions" "\fB\-\-extension\fP, \fB\-\-app\-extension\fP, \fB\-\-extension\-info\fP"
114
+ .Ix "File size" "\fB\-\-optimize\fP, \fB\-\-unoptimize\fP, \fB\-\-colors\fP"
115
+ .TP 30
116
+ Image transformations
117
+ .Ix "\ \ \ cropping" "\fB\-\-crop\fP, \fB\-\-crop\-transparency\fP"
118
+ .Ix "\ \ \ flipping" "\fB\-\-flip\-*\fP"
119
+ .Ix "\ \ \ resizing" "\fB\-\-resize\fP, \fB\-\-scale\fP"
120
+ .Ix "\ \ \ rotating" "\fB\-\-rotate\-*\fP"
121
+ .Ix "Grayscale" "\fB\-\-use\-colormap\fP"
122
+ .Ix "Interlacing" "\fB\-\-interlace\fP"
123
+ .Ix "Positioning frames" "\fB\-\-position\fP"
124
+ .Ix "Screen, logical" "\fB\-\-logical\-screen\fP"
125
+ .Ix "Selecting frames" "frame selections (like \fB'#0'\fP)"
126
+ .Ix "Transparency" "\fB\-\-transparent\fP"
127
+ .Ix "Warnings" "\fB\-\-no\-warnings\fP"
128
+ .PD
129
+ '
130
+ .SH COMMAND LINE
131
+
132
+ .BR gifsicle 's
133
+ command line consists of GIF input files and options. Most options start
134
+ with a dash (\-) or plus (+); frame selections, a kind of option, start
135
+ with a number sign (#). Anything else is a GIF input file.
136
+ .PP
137
+ .B gifsicle
138
+ reads and processes GIF input files in order. If no GIF input file is
139
+ given, or you give the special filename \(oq\-\(cq,
140
+ it reads from the standard input.
141
+ .PP
142
+ .B gifsicle
143
+ exits with status 0 if there were no errors and status 1 otherwise.
144
+ '
145
+ .SH OPTIONS
146
+
147
+ Every option has a long form,
148
+ .Qo \-\-long\-descriptive\-name .
149
+ You don't need to type the whole long descriptive name, just enough to
150
+ make it unambiguous.
151
+ .PP
152
+ Some options also have a short form,
153
+ .Qo \-X .
154
+ You can combine short options if they don't take arguments:
155
+ .Qo \-IIb
156
+ is the same as
157
+ .Qo "\-I \-I \-b" .
158
+ But be careful with options that do take arguments:
159
+ .Qo \-cblah
160
+ means
161
+ .Qo "\-c \fRblah" ,
162
+ not
163
+ .Qo "\-c \-b \-l \-a \-h" .
164
+ .PP
165
+ Many options also have a converse,
166
+ .Qo \-\-no\-option ,
167
+ which turns off the option. You can turn off a short option
168
+ .Qo \-X
169
+ by saying
170
+ .Qo \+X
171
+ instead.
172
+ '
173
+ .\" -----------------------------------------------------------------
174
+ .SS Mode Options
175
+
176
+ Mode options tell
177
+ .B gifsicle
178
+ what kind of output to generate. There can be at most one, and it must
179
+ precede any GIF inputs.
180
+ .TP 5
181
+ .Op "\-\-merge" ", " "\-m"
182
+ '
183
+ Combine all GIF inputs into one file with multiple frames and write that
184
+ file to the standard output. This is the default mode.
185
+ '
186
+ .TP
187
+ .Op \-\-batch ", " \-b
188
+ '
189
+ Modify each GIF input in place by reading and writing to the same filename.
190
+ (GIFs read from the standard input are written to the standard output.)
191
+ '
192
+ .TP
193
+ .Op \-\-explode ", " \-e
194
+ '
195
+ Create an output GIF for each frame of each input file. The output GIFs are
196
+ named \(oqxxx.000\(cq, \(oqxxx.001\(cq, and so on, where \(oqxxx\(cq is the name of the input
197
+ file (or whatever you specified with
198
+ .Qo \-\-output )
199
+ and the numeric extension is the frame number.
200
+ '
201
+ .TP
202
+ .Op \-\-explode\-by\-name ", " \-E
203
+ '
204
+ Same as
205
+ .Op \-\-explode ","
206
+ but write any named frames to files \(oqxxx.\fIname\fR\(cq instead of
207
+ \(oqxxx.\fIframe-number\fR\(cq. Frames are named using the
208
+ .Qo \-\-name
209
+ option.
210
+ '
211
+ .\" -----------------------------------------------------------------
212
+ .SS General Options
213
+
214
+ General options control the information
215
+ .B gifsicle
216
+ prints and where it writes its output. The info options and
217
+ .Op \-\-verbose
218
+ can be turned off with
219
+ .Qo \-\-no\-X .
220
+ '
221
+ .Sp
222
+ .PD 0
223
+ .TP 5
224
+ .Op \-\-info ", " \-I
225
+ '
226
+ Print a human-readable description of each input GIF to the standard
227
+ output, or whatever file you specify with
228
+ .Op \-o .
229
+ This option suppresses normal output, and cannot be combined with mode
230
+ options like
231
+ .Op \-\-batch .
232
+ If you give two
233
+ .Op \-\-info
234
+ or
235
+ .Op \-I
236
+ options, however, information is printed to standard error, and normal
237
+ output takes place as usual.
238
+ '
239
+ .Sp
240
+ .TP 5
241
+ .Op \-\-color\-info ", " \-\-cinfo
242
+ '
243
+ Like
244
+ .Op \%\-\-info ,
245
+ but also print information about input files' colormaps.
246
+ '
247
+ .Sp
248
+ .TP 5
249
+ .Op \-\-extension\-info ", " \-\-xinfo
250
+ '
251
+ Like
252
+ .Op \%\-\-info ,
253
+ but also print any unrecognized GIF extensions in a
254
+ .BR hexdump (1)-like
255
+ format.
256
+ '
257
+ .Sp
258
+ .TP 5
259
+ .Op \-\-size\-info ", " \-\-sinfo
260
+ '
261
+ Like
262
+ .Op \%\-\-info ,
263
+ but also print information about compressed image sizes.
264
+ '
265
+ .Sp
266
+ .TP 5
267
+ .Op \-\-help ", " \-h
268
+ '
269
+ Print usage information and exit.
270
+ '
271
+ .Sp
272
+ .TP
273
+ .Oa \-o file
274
+ .TP
275
+ .Oa \-\-output file
276
+ '
277
+ Send output to
278
+ .IR file .
279
+ The special filename \(oq-\(cq means the standard output.
280
+ '
281
+ .Sp
282
+ .TP
283
+ .Op \-\-verbose ", " \-V
284
+ '
285
+ Print progress information (files read and written) to standard
286
+ error.
287
+ '
288
+ .Sp
289
+ .TP
290
+ .Op \-\-no\-warnings ", " \-w
291
+ '
292
+ Suppress all warning messages.
293
+ '
294
+ .Sp
295
+ .TP
296
+ .Op \-\-no\-ignore\-errors
297
+ '
298
+ Exit with status 1 when encountering a very erroneous GIF. Default is to
299
+ muddle on.
300
+ '
301
+ .Sp
302
+ .TP
303
+ .Op \-\-version
304
+ '
305
+ Print the version number and some short non-warranty information and exit.
306
+ '
307
+ .Sp
308
+ .PD 0
309
+ .TP 5
310
+ .Op \-\-careful
311
+ '
312
+ Write slightly larger GIFs that avoid bugs in some other GIF
313
+ implementations. Some Java and Internet Explorer versions cannot display
314
+ the correct, minimal GIFs that Gifsicle produces. Use the
315
+ .Op \-\-careful
316
+ option if you are having problems with a particular image.
317
+ '
318
+ .Sp
319
+ .TP
320
+ .Op \-\-conserve\-memory
321
+ '
322
+ Conserve memory usage at the expense of processing time. This may be useful
323
+ if you are processing large GIFs on a computer without very much memory.
324
+ '
325
+ .Sp
326
+ .TP
327
+ .Op \-\-nextfile
328
+ '
329
+ Allow input files to contain multiple concatenated GIF images. If a
330
+ filename appears multiple times on the command line, \fBgifsicle\fR will
331
+ read a new image from the file each time. This option can help scripts
332
+ avoid the need for temporary files. For example, to create an animated GIF
333
+ with three frames with different delays, you might run "\fBgifsicle
334
+ \-\-nextfile \-d10 \- \-d20 \- \-d30 \- > out.gif\fR" and write the three
335
+ GIF images, in sequence, to \fBgifsicle\fR's standard input.
336
+ '
337
+ .Sp
338
+ .TP
339
+ .Op \-\-multifile
340
+ '
341
+ Like
342
+ .Op \-\-nextfile ,
343
+ but read
344
+ .I as many GIF images as possible
345
+ from each file. This option is intended for scripts. For example, to merge
346
+ an unknown number of GIF images into a single animation, run "\fBgifsicle
347
+ \-\-multifile \- > out.gif\fR" and write the GIF images, in sequence, to
348
+ \fBgifsicle\fR's standard input. Any frame selections apply only to the
349
+ last file in the concatenation.
350
+ '
351
+ .PD
352
+ '
353
+ .\" -----------------------------------------------------------------
354
+ .SS Frame Selections
355
+
356
+ A frame selection tells
357
+ .B gifsicle
358
+ which frames to use from the current input file. They are useful only for
359
+ animations, as non-animated GIFs only have one frame. Here are the
360
+ acceptable forms for frame specifications.
361
+ .Sp
362
+ .PD 0
363
+ .TP 13
364
+ .BI # num
365
+ '
366
+ Select frame \fInum\fR. (The first frame is
367
+ .Qo #0 .
368
+ Negative numbers count backwards from the last frame, which is
369
+ .Qo #-1 .)
370
+ '
371
+ .TP 13
372
+ .BI # num1 \- num2
373
+ '
374
+ Select frames \fInum1\fR through \fInum2\fR.
375
+ '
376
+ .TP 13
377
+ .BI # num1 \-
378
+ '
379
+ Select frames \fInum1\fR through the last frame.
380
+ '
381
+ .TP 13
382
+ .BI # name
383
+ '
384
+ Select the frame named \fIname\fR.
385
+ .PD
386
+ .PP
387
+ The \(oq#\(cq character has special meaning for many shells, so you generally
388
+ need to quote it.
389
+ .PP
390
+ For example,
391
+ .Xs
392
+ \fBgifsicle happy.gif "#0"\fR
393
+ .Xe
394
+ uses the first frame from happy.gif;
395
+ .Xs
396
+ \fBgifsicle happy.gif "#0-2"\fR
397
+ .Xe
398
+ uses its first three frames; and
399
+ .Xs
400
+ \fBgifsicle happy.gif "#-1-0"\fR
401
+ .Xe
402
+ uses its frames in reverse order (starting from frame #-1\*Ethe
403
+ last frame\*Eand ending at frame #0\*Ethe first).
404
+ .PP
405
+ The action performed with the selected frames depends on the current
406
+ mode. In merge mode, only the selected frames are merged into the output
407
+ GIF. In batch mode, only the selected frames are modified; other frames
408
+ remain unchanged. In explode mode, only the selected frames are exploded
409
+ into output GIFs.
410
+ '
411
+ .\" -----------------------------------------------------------------
412
+ .SS Frame Change Options
413
+
414
+ Frame change options insert new frames into an animation or replace or
415
+ delete frames that already exist. Some things\*Efor example, changing one
416
+ frame in an animation\*Eare difficult to express with frame selections, but
417
+ easy with frame changes.
418
+ '
419
+ .TP 5
420
+ .Oa \-\-delete frames " [" frames ".\|.\|.]"
421
+ '
422
+ Delete
423
+ .I frames
424
+ from the input GIF.
425
+ '
426
+ .TP
427
+ .Oa \-\-insert\-before "frame other-GIFs"
428
+ '
429
+ Insert
430
+ .I other-GIFs
431
+ before
432
+ .I frame
433
+ in the input GIF.
434
+ '
435
+ .TP
436
+ .Oa \-\-append "other-GIFs"
437
+ '
438
+ Append
439
+ .I other-GIFs
440
+ to the input GIF.
441
+ '
442
+ .TP
443
+ .Oa \-\-replace "frames other-GIFs"
444
+ '
445
+ Replace
446
+ .I frames
447
+ from the input GIF with
448
+ .IR other-GIFs .
449
+ '
450
+ .TP
451
+ \fB\-\-done\fR
452
+ '
453
+ Complete the current set of frame changes.
454
+ '
455
+ .PP
456
+ The
457
+ .I frames
458
+ arguments are frame selections (see above). These arguments always refer to
459
+ frames from the
460
+ .I original
461
+ input GIF. So, if \(oqa.gif\(cq has 3 frames and \(oqb.gif\(cq has one, this
462
+ command
463
+ .Xs
464
+ \fBgifsicle a.gif \-\-delete "#0" \-\-replace "#2" b.gif\fR
465
+ .Xe
466
+ will produce an output animation with 2 frames: \(oqa.gif\(cq frame 1, then
467
+ \(oqb.gif\(cq.
468
+ .PP
469
+ The
470
+ .I other-GIFs
471
+ arguments are any number of GIF input files and frame selections.
472
+ These images are combined in merge mode and added to the input GIF.
473
+ The
474
+ .I other-GIFs
475
+ last until the next frame change option, so this command replaces the
476
+ first frame of \(oqin.gif\(cq with the merge of \(oqa.gif\(cq and \(oqb.gif\(cq:
477
+ .Xs
478
+ \fBgifsicle \-b in.gif \-\-replace "#0" a.gif b.gif\fR
479
+ .Xe
480
+ .PP
481
+ This command, however, replaces the first frame of \(oqin.gif\(cq with
482
+ \(oqa.gif\(cq and then processes \(oqb.gif\(cq separately:
483
+ .Xs
484
+ \fBgifsicle \-b in.gif \-\-replace "#0" a.gif \-\-done b.gif\fR
485
+ .Xe
486
+ .PP
487
+ Warning: You shouldn't use both frame selections and frame changes on
488
+ the same input GIF.
489
+ '
490
+ .\" -----------------------------------------------------------------
491
+ .SS Image Options
492
+
493
+ Image options modify input images\*Eby changing their interlacing,
494
+ transparency, and cropping, for example. Image options have three forms:
495
+ .Qo \-\-X ,
496
+ .Qo \-\-no\-X ,
497
+ and
498
+ .Qo \-\-same\-X .
499
+ The
500
+ .Qo \-\-X
501
+ form selects a value for the feature, the
502
+ .Qo \-\-no\-X
503
+ form turns off the feature, and the
504
+ .Qo \-\-same\-X
505
+ form means that the feature's value is copied from each input. The default
506
+ is always
507
+ .Qo \-\-same\-X .
508
+ For example,
509
+ .Op \-background= """#0000FF"""
510
+ sets the background color to blue,
511
+ .Op \-\-no\-background
512
+ turns the background color off (by setting it to 0), and
513
+ .Op \-\-same\-background
514
+ uses input images' existing background colors. You can give each option
515
+ multiple times; for example,
516
+ .Xs
517
+ \fBgifsicle \-b \-O2 \-i a.gif \-\-same\-interlace b.gif c.gif\fR
518
+ .Xe
519
+ will make \(oqa.gif\(cq interlaced, but leave \(oqb.gif\(cq and \(oqc.gif\(cq interlaced only
520
+ if they were already.
521
+ '
522
+ .Sp
523
+ .PD 0
524
+ .TP 5
525
+ .Oa \-B color
526
+ .TP
527
+ .Oa \-\-background color
528
+ '
529
+ Set the output GIF's background to
530
+ .IR color .
531
+ The argument can have the same forms as in the
532
+ .Op \-\-transparent
533
+ option below.
534
+ '
535
+ .Sp
536
+ .TP
537
+ .Oa \-\-crop x1 , y1 - x2\fR,\fIy2
538
+ .TP
539
+ .Oa \-\-crop x1 , y1 + width\fRx\fIheight
540
+ '
541
+ Crop the following input frames to a smaller rectangular area. The top-left
542
+ corner of this rectangle is
543
+ .RI ( x1 , y1 );
544
+ you can give either the lower-right corner,
545
+ .RI ( x2 , y2 ),
546
+ or the width and height of the rectangle. In the
547
+ .IR x1 , y1 + width x height
548
+ form,
549
+ .I width
550
+ and
551
+ .I height
552
+ can be zero or negative. A zero dimension means the cropping area goes to
553
+ the edge of the image; a negative dimension brings the cropping area that
554
+ many pixels back from the image edge. For example,
555
+ .Op \-\-crop " 2,2+-2x-2"
556
+ will shave 2 pixels off each side of the input image. Cropping takes place
557
+ before any rotation, flipping, resizing, or positioning.
558
+ '
559
+ .Sp
560
+ .TP
561
+ .Op \-\-crop\-transparency
562
+ '
563
+ Crop any transparent borders off the following input frames. This happens
564
+ after any cropping due to the
565
+ .Op \-\-crop
566
+ option. It works on the raw input images; for example, any transparency
567
+ options have not yet been applied.
568
+ '
569
+ .Sp
570
+ .TP
571
+ .Op \-\-flip\-horizontal
572
+ .TP
573
+ .Op \-\-flip\-vertical
574
+ '
575
+ Flip the following frames horizontally or vertically.
576
+ '
577
+ .Sp
578
+ .TP
579
+ .Op \-i
580
+ .TP
581
+ .Op \-\-interlace
582
+ '
583
+ Turn interlacing on.
584
+ '
585
+ .Sp
586
+ .TP
587
+ .Oa \-S width x height
588
+ .TP
589
+ .Oa \-\-logical\-screen width x height
590
+ '
591
+ Set the output logical screen to
592
+ .IR width x height .
593
+ .Op \-\-no\-logical\-screen
594
+ sets the output logical screen to the size of the largest output
595
+ frame, while
596
+ .Op \-\-same\-logical\-screen
597
+ sets the output logical screen to the largest input logical screen.
598
+ .Op \-\-screen
599
+ is a synonym for
600
+ .Op \-\-logical\-screen .
601
+ '
602
+ .Sp
603
+ .TP
604
+ .Oa \-p x\fR,\fIy
605
+ .TP
606
+ .Oa \-\-position x\fR,\fIy
607
+ '
608
+ Set the following frames' positions to
609
+ .RI ( x , y ).
610
+ .Op \-\-no\-position
611
+ means
612
+ .Op \-\-position " 0,0."
613
+ Normally,
614
+ .Oa \-\-position x\fR,\fIy
615
+ places every succeeding frame exactly at \fIx\fR,\fIy\fR. However, if an
616
+ entire animation is input, \fIx\fR,\fIy\fR is treated as the position for
617
+ the animation.
618
+ '
619
+ .Sp
620
+ .TP
621
+ .Op \-\-rotate\-90
622
+ .TP
623
+ .Op \-\-rotate\-180
624
+ .TP
625
+ .Op \-\-rotate\-270
626
+ '
627
+ Rotate the following frames by 90, 180, or 270 degrees.
628
+ .Op \-\-no\-rotate
629
+ turns off any rotation.
630
+ '
631
+ .Sp
632
+ .TP
633
+ .Oa \-t color
634
+ .TP
635
+ .Oa \-\-transparent color
636
+ '
637
+ Make
638
+ .I color
639
+ transparent in the following frames.
640
+ .I Color
641
+ can be a colormap index (0\-255), a hexadecimal color specification
642
+ (like "#FF00FF" for magenta), or slash- or comma-separated red, green
643
+ and blue values (each between 0 and 255).
644
+ .PD
645
+ '
646
+ .\" -----------------------------------------------------------------
647
+ .SS Extension Options
648
+
649
+ Extension options add non-visual information to the output GIF. This
650
+ includes names, comments, and generic extensions.
651
+ '
652
+ .Sp
653
+ .PD 0
654
+ .TP 5
655
+ .Oa \-\-app\-extension app\-name " " extension
656
+ '
657
+ Add an application extension named
658
+ .I app\-name
659
+ and with the value
660
+ .I extension
661
+ to the output GIF.
662
+ .Op \-\-no\-app\-extensions
663
+ removes application extensions from the input images.
664
+ '
665
+ .Sp
666
+ .TP
667
+ .Oa \-c text
668
+ .TP
669
+ .Oa \-\-comment text
670
+ '
671
+ Add a comment,
672
+ .IR text ,
673
+ to the output GIF. The comment will be placed before the next frame in
674
+ the stream.
675
+ .Op \-\-no\-comments
676
+ removes comments from the input images.
677
+ '
678
+ .Sp
679
+ .TP
680
+ .Oa \-\-extension number " " extension
681
+ '
682
+ Add an extension numbered
683
+ .I number
684
+ and with the value
685
+ .I extension
686
+ to the output GIF.
687
+ .I Number
688
+ can be in decimal, octal, hex, or it can be a single character like \(oqn\(cq,
689
+ whose ASCII value is used.
690
+ .Op \-\-no\-extensions
691
+ (or
692
+ .Op +x )
693
+ removes extensions from the input images.
694
+ '
695
+ .Sp
696
+ .TP
697
+ .Oa \-n text
698
+ .TP
699
+ .Oa \-\-name text
700
+ '
701
+ Set the next frame's name to
702
+ .IR text .
703
+ This name is stored as an extension in the output GIF (extension number
704
+ 0xCE, followed by the characters of the frame name).
705
+ .Op \-\-no\-names
706
+ removes name extensions from the input images.
707
+ '
708
+ .PD
709
+ '
710
+ .\" -----------------------------------------------------------------
711
+ .SS Animation Options
712
+
713
+ Animation options apply to GIF animations, or to individual frames in GIF
714
+ animations. As with image options, most animation options have three forms,
715
+ .Qo \-\-X ,
716
+ .Qo \-\-no\-X ,
717
+ and
718
+ .Qo \-\-same\-X ,
719
+ and you can give animation options multiple times; for example,
720
+ .Xs
721
+ \fBgifsicle \-b a.gif \-d50 "#0" "#1" \-d100 "#2" "#3"\fR
722
+ .Xe
723
+ sets the delays of frames 0 and 1 to 50, and frames 2 and 3 to 100.
724
+ '
725
+ .Sp
726
+ .PD 0
727
+ .TP 5
728
+ .Oa \-d time
729
+ .TP
730
+ .Oa \-\-delay time
731
+ '
732
+ Set the delay between frames to
733
+ .IR time
734
+ in hundredths of a second.
735
+ '
736
+ .Sp
737
+ .TP
738
+ .Oa \-D method
739
+ .TP
740
+ .Oa \-\-disposal method
741
+ '
742
+ Set the disposal method for the following frames to
743
+ .IR method .
744
+ A frame's disposal method determines how a viewer should remove the frame
745
+ when it's time to display the next.
746
+ .I Method
747
+ can be a number between 0 and 7 (although only 0 through 3 are
748
+ generally meaningful), or one of these names:
749
+ .BR none
750
+ (leave the frame visible for future frames to build upon),
751
+ .BR asis
752
+ (same as "none"),
753
+ .BR background " (or " bg ")"
754
+ (replace the frame with the background), or
755
+ .BR previous
756
+ (replace the frame with the area from the previous displayed frame).
757
+ .Op \-\-no\-disposal
758
+ means
759
+ .Op \-\-disposal = none .
760
+ '
761
+ .Sp
762
+ .TP
763
+ .Op \-l "[\fIcount\fR]"
764
+ .TP
765
+ .Op \-\-loopcount "[=\fIcount\fR]"
766
+ '
767
+ Set the Netscape loop extension to
768
+ .IR count .
769
+ .I Count
770
+ is an integer, or
771
+ .B forever
772
+ to loop endlessly. If you supply a
773
+ .Op \-\-loopcount
774
+ option without specifying
775
+ .IR count ,
776
+ Gifsicle will use
777
+ .BR forever .
778
+ .Op \-\-no\-loopcount
779
+ (the default) turns off looping.
780
+ .Sp
781
+ Set the loop count to one less than the number of times you want the
782
+ animation to run. An animation with
783
+ .Op \-\-no\-loopcount
784
+ will show every frame once;
785
+ .Op \-\-loopcount =1
786
+ will loop once, thus showing every frame twice; and so forth.
787
+ Note that
788
+ .Op \-\-loopcount =0
789
+ is equivalent to
790
+ .Op \-\-loopcount =forever,
791
+ not
792
+ .Op \-\-no\-loopcount .
793
+ '
794
+ .Sp
795
+ .TP
796
+ .Op \-O "[\fIlevel\fR]"
797
+ .TP
798
+ .Op \-\-optimize "[=\fIlevel\fR]"
799
+ '
800
+ Optimize output GIF animations for space.
801
+ .I Level
802
+ determines how much optimization is done; higher levels take longer, but
803
+ may have better results. There are currently three levels:
804
+ .Sp
805
+ .RS
806
+ .TP 5
807
+ .Op \-O1
808
+ Stores only the changed portion of each image. This is the default.
809
+ .TP 5
810
+ .Op \-O2
811
+ Also uses transparency to shrink the file further.
812
+ .TP 5
813
+ .Op \-O3
814
+ Try several optimization methods (usually slower, sometimes better results).
815
+ .Sp
816
+ .PP
817
+ Other optimization flags provide finer-grained control.
818
+ .Sp
819
+ .TP 5
820
+ .Op \-Okeep-empty
821
+ Preserve empty transparent frames (they are dropped by default).
822
+ .Sp
823
+ .PP
824
+ You may also be interested in other options for shrinking GIFs, such as
825
+ .Op \-k
826
+ and
827
+ .Op \-\-no\-extensions .
828
+ .RE
829
+ '
830
+ .Sp
831
+ .TP 5
832
+ .Oa \-U
833
+ .TP
834
+ .Oa \-\-unoptimize
835
+ '
836
+ Unoptimize GIF animations into an easy-to-edit form.
837
+ .Sp
838
+ GIF animations are often optimized (see
839
+ .Op \-\-optimize )
840
+ to make them smaller and faster to load, which unfortunately makes them
841
+ difficult to edit.
842
+ .Op \-\-unoptimize
843
+ changes optimized input GIFs into unoptimized GIFs, where each frame is a
844
+ faithful representation of what a user would see at that point in the
845
+ animation.
846
+ .RE
847
+ '
848
+ .PD
849
+ '
850
+ .\" -----------------------------------------------------------------
851
+ .SS Image Transformation Options
852
+ '
853
+ Image transformation options apply to entire GIFs as they are read or
854
+ written. They can be turned off with
855
+ .Qo \-\-no\-option .
856
+ '
857
+ .Sp
858
+ .PD 0
859
+ .TP 5
860
+ .Oa \-\-resize width x height
861
+ '
862
+ Resize the output GIF to
863
+ .IR width x height .
864
+ Either
865
+ .I width
866
+ or
867
+ .I height
868
+ may be an underscore \(oq_\(cq. If the argument is
869
+ .IR width x_,
870
+ then the output GIF is scaled to
871
+ .I width
872
+ pixels wide without changing its aspect ratio. An analogous operation is
873
+ performed for
874
+ .RI _x height .
875
+ Resizing happens after all input frames have been combined and before
876
+ optimization. Resizing uses logical screen dimensions; if
877
+ the input stream has an unusual logical screen (many GIF displayers ignore
878
+ logical screens), you may want to provide
879
+ .Op \-\-no\-logical\-screen
880
+ (or
881
+ .Op +S )
882
+ to reset it so
883
+ .B gifsicle
884
+ uses image dimensions instead. See also
885
+ .Op \-\-resize\-method .
886
+ '
887
+ .Sp
888
+ .TP
889
+ .Oa \-\-resize\-width width
890
+ .TP
891
+ .Oa \-\-resize\-height height
892
+ '
893
+ Like
894
+ .Oa \-\-resize width x_
895
+ and
896
+ .Oa \-\-resize "" _x height
897
+ respectively.
898
+ '
899
+ .Sp
900
+ .TP
901
+ .Oa \-\-resize\-fit width x height
902
+ '
903
+ Like
904
+ .Op \-\-resize ,
905
+ but resizes the output GIF to fit
906
+ .I within
907
+ a rectangle with dimensions
908
+ .IR width x height .
909
+ The GIF's aspect ratio remains unchanged. No resize is performed if the GIF already
910
+ fits within the given rectangle. Either
911
+ .I width
912
+ or
913
+ .I height
914
+ may be an underscore \(oq_\(cq, which is treated as infinity.
915
+ '
916
+ .Sp
917
+ .TP
918
+ .Oa \-\-resize\-fit\-width width
919
+ .TP
920
+ .Oa \-\-resize\-fit\-height height
921
+ '
922
+ Like
923
+ .Oa \-\-resize\-fit width x_
924
+ and
925
+ .Oa \-\-resize\-fit "" _x height
926
+ respectively.
927
+ '
928
+ .Sp
929
+ .TP
930
+ .Oa \-\-scale Xfactor [x Yfactor ]
931
+ '
932
+ Scale the output GIF's width and height by
933
+ .IR Xfactor " and " Yfactor .
934
+ If
935
+ .I Yfactor
936
+ is not given, it defaults to
937
+ .IR Xfactor .
938
+ Scaling happens after all input frames have been combined and before
939
+ optimization.
940
+ '
941
+ .Sp
942
+ .TP
943
+ .Oa \-\-resize\-method method
944
+ '
945
+ Set the method used to resize images. The \(oqsample\(cq method runs
946
+ very quickly, but when shrinking images, it produces noisy results.
947
+ The \(oqmix\(cq method is somewhat slower, but produces better-looking
948
+ results. The default method is
949
+ currently \(oqmix\(cq.
950
+ .RS
951
+ .Sp
952
+ .PP
953
+ Details: The resize methods differ most when shrinking images. The
954
+ \(oqsample\(cq method is a point sampler. Each pixel position in the
955
+ output image maps to exactly one pixel position in the input, so when
956
+ shrinking, full rows and columns from the input are dropped. The other
957
+ methods use all input pixels, which generally produces better-looking
958
+ images. The \(oqbox\(cq method, a box sampler, is faster than the more
959
+ complex filters and produces somewhat sharper results, but there will
960
+ be anomalies when shrinking images by a small amount in one dimension.
961
+ (Some output pixels will correspond to exactly 1 input row or column,
962
+ while others will correspond to exactly 2 input rows or columns.) The
963
+ \(oqmix\(cq method is a full bilinear interpolator. This is slower and
964
+ produces somewhat blurrier results, but avoids such anomalies.
965
+ .Sp
966
+ .PP
967
+ Gifsicle also supports several complex resamplers, including
968
+ Catmull-Rom cubic resampling (\(oqcatrom\(cq), the Mitchell-Netravali
969
+ filter (\(oqmitchell\(cq), a 2-lobed Lanczos filter
970
+ (\(oqlanczos2\(cq), and a 3-lobed Lanczos filter (\(oqlanczos3\(cq).
971
+ These filters are slower still, but can give sharper, better results.
972
+ .RE
973
+ '
974
+ .Sp
975
+ .TP
976
+ .Oa \-\-resize\-colors n
977
+ '
978
+ Allow Gifsicle to add intermediate colors when resizing images.
979
+ Normally, Gifsicle's resize algorithms use input images' color
980
+ palettes without changes. When shrinking images with very few colors
981
+ (e.g., pure black-and-white images), adding intermediate colors can
982
+ improve the results. Example:
983
+ .Oa \-\-resize\-colors 64
984
+ allows Gifsicle to add intermediate colors for images that have fewer
985
+ than 64 input colors.
986
+ .PD
987
+ '
988
+ .\" -----------------------------------------------------------------
989
+ .SS Color Options
990
+ '
991
+ Color options apply to entire GIFs as they are read or
992
+ written. They can be turned off with
993
+ .Qo \-\-no\-option .
994
+ .Sp
995
+ .PD 0
996
+ .TP 5
997
+ .Oa \-k num
998
+ .TP
999
+ .Oa \-\-colors num
1000
+ '
1001
+ Reduce the number of distinct colors in each output GIF to
1002
+ .I num
1003
+ or less.
1004
+ .I Num
1005
+ must be between 2 and 256. This can be used to shrink output GIFs or
1006
+ eliminate any local color tables.
1007
+ .Sp
1008
+ Normally, an adaptive group of colors is chosen from the existing
1009
+ color table. You can affect this process with the
1010
+ .Op \-\-color\-method
1011
+ option or by giving your own colormap with
1012
+ .Op \-\-use\-colormap .
1013
+ Gifsicle may need to add an additional color (making
1014
+ .IR num +1
1015
+ in all) if there is transparency in the image.
1016
+ '
1017
+ .Sp
1018
+ .TP
1019
+ .Oa \-\-color\-method method
1020
+ '
1021
+ Determine how a smaller colormap is chosen.
1022
+ .RB \(oq diversity \(cq,
1023
+ the default, is
1024
+ .BR xv (1)'s
1025
+ diversity algorithm, which uses a strict subset of the existing colors
1026
+ and generally produces good results.
1027
+ .RB \(oq blend\-diversity \(cq
1028
+ is a modification of this: some color values are blended from groups of
1029
+ existing colors.
1030
+ .RB \(oq median\-cut \(cq
1031
+ is the median cut algorithm described by Heckbert.
1032
+ .Op \-\-method
1033
+ is a synonym for
1034
+ .Op \-\-color\-method .
1035
+ '
1036
+ .Sp
1037
+ .TP 5
1038
+ .Oa \-f
1039
+ .TP
1040
+ .Op \-\-dither "[=\fImethod\fR]"
1041
+ '
1042
+ When
1043
+ .Op \-\-dither
1044
+ is on and the colormap is changed, combinations of colors are used to
1045
+ approximate missing colors. This looks better, but makes bigger files
1046
+ and can cause animation artifacts, so it is off by default.
1047
+ .Sp
1048
+ Specify a dithering algorithm with the optional \fImethod\fR argument.
1049
+ The default,
1050
+ .RB \(oq floyd-steinberg \(cq,
1051
+ uses Floyd-Steinberg error
1052
+ diffusion. This usually looks best, but can cause animation artifacts,
1053
+ because dithering choices will vary from frame to frame. Gifsicle also
1054
+ supports ordered dithering algorithms that avoid animation artifacts.
1055
+ The
1056
+ .RB \(oq ro64 \(cq
1057
+ mode uses a
1058
+ large, random-looking pattern and generally produces good results. The
1059
+ .RB \(oq o3 \(cq,
1060
+ .RB \(oq o4 \(cq,
1061
+ and
1062
+ .RB \(oq o8 \(cq
1063
+ modes use smaller, more
1064
+ regular patterns. The
1065
+ .RB \(oq ordered \(cq
1066
+ mode chooses a good ordered
1067
+ dithering algorithm. For special effects, try the halftone modes
1068
+ .RB \(oq halftone \(cq,
1069
+ .RB \(oq squarehalftone \(cq,
1070
+ and
1071
+ .RB \(oq diagonal \(cq.
1072
+ Some modes take optional parameters using commas. The halftone modes
1073
+ take a cell size and a color limit:
1074
+ .RB \(oq halftone,10,3 \(cq
1075
+ creates 10-pixel wide halftone cells where each cell uses up to 3
1076
+ colors.
1077
+ '
1078
+ .Sp
1079
+ .TP 5
1080
+ .Oa \-\-gamma gamma
1081
+ '
1082
+ Set the gamma correction to
1083
+ .IR gamma ,
1084
+ which can be a real number or
1085
+ .RB \(oq srgb \(cq.
1086
+ Roughly speaking, higher
1087
+ numbers exaggerate shadows and lower numbers exaggerate highlights.
1088
+ The default is the function defined by the standard sRGB color space,
1089
+ which usually works well. (Its effects are similar to
1090
+ \fB\-\-gamma\fP=2.2.) Gifsicle uses gamma correction when choosing a
1091
+ color palette (\fB\-\-colors\fP) and when dithering
1092
+ (\fB\-\-dither\fP).
1093
+ '
1094
+ .Sp
1095
+ .PD 0
1096
+ .TP
1097
+ .Oa \-\-change\-color color1 " " color2
1098
+ '
1099
+ Change
1100
+ .I color1
1101
+ to
1102
+ .I color2
1103
+ in the following input GIFs. (The
1104
+ .I color
1105
+ arguments have the same forms as in the
1106
+ .Op \-t
1107
+ option.) Change multiple colors by giving the option multiple
1108
+ times. Color changes don't interfere with one another, so you can safely
1109
+ swap two colors with
1110
+ .Qa \-\-change\-color "color1 color2" \-\-change\-color "color2 color1" .
1111
+ They all take effect as an input GIF is read.
1112
+ .Op \-\-no\-change\-color
1113
+ cancels all color changes.
1114
+ '
1115
+ .Sp
1116
+ .TP
1117
+ .Oa \-\-transform\-colormap command
1118
+ '
1119
+ .I Command
1120
+ should be a shell command that reads from standard input and writes to
1121
+ standard output. Each colormap in the output GIF is translated into text
1122
+ colormap format (see
1123
+ .Op \-\-use\-colormap
1124
+ below) and piped to the command. The output that command generates
1125
+ (which should also be in text colormap format) will replace the input
1126
+ colormap. The replacement doesn't consider color matching, so pixels
1127
+ that used color slot
1128
+ .I n
1129
+ in the input will still use color slot
1130
+ .I n
1131
+ in the output.
1132
+ '
1133
+ .Sp
1134
+ .TP
1135
+ .Oa \-\-use\-colormap colormap
1136
+ '
1137
+ Change the image to use
1138
+ .IR colormap .
1139
+ Each pixel in the image is changed to the closest match in
1140
+ .I colormap
1141
+ (or, if
1142
+ .Op \-\-dither
1143
+ is on, to a dithered combination of colors in
1144
+ .IR colormap ")."
1145
+ .I Colormap
1146
+ can be
1147
+ .BR web
1148
+ for the 216-color \(lqWeb-safe palette\(rq;
1149
+ .BR gray
1150
+ for grayscale;
1151
+ .BR bw
1152
+ for black-and-white; or the name of a file. That file should either be a
1153
+ text file (the format is described below) or a GIF file, whose global
1154
+ colormap will be used. If
1155
+ .Op \-\-colors\fR=\fIN
1156
+ is also given, an
1157
+ .IR N \-sized
1158
+ subset of
1159
+ .I colormap
1160
+ will be used.
1161
+ .Sp
1162
+ Text colormap files use this format:
1163
+ .Es
1164
+ ; each non-comment line represents one color, "red green blue"
1165
+ ; each component should be between 0 and 255
1166
+ 0 0 0 ; like this
1167
+ 255 255 255
1168
+ ; or use web hex notation
1169
+ #ffffff ; like this
1170
+ .Ee
1171
+ '
1172
+ .PD
1173
+ .PP
1174
+ .br
1175
+ '
1176
+ .SH EXAMPLES
1177
+ '
1178
+ First, let's create an animation, \(oqanim.gif\(cq:
1179
+ .Es
1180
+ \fBgifsicle a.gif b.gif c.gif d.gif > anim.gif\fR
1181
+ .Ee
1182
+ This animation will move very quickly: since we didn't specify a delay, a
1183
+ browser will cycle through the frames as fast as it can. Let's slow it down
1184
+ and pause .5 seconds between frames, using the
1185
+ .Op \-\-delay
1186
+ option.
1187
+ .Es
1188
+ \fBgifsicle \-\-delay 50 a.gif b.gif c.gif d.gif > anim.gif\fR
1189
+ .Ee
1190
+ If we also want the GIF to loop three times, we can use
1191
+ .Op \-\-loopcount :
1192
+ .Es
1193
+ \fBgifsicle \-d 50 \-\-loop=3 a.gif b.gif c.gif d.gif > anim.gif\fR
1194
+ .Ee
1195
+ (Rather than type
1196
+ .Op \-\-delay
1197
+ again, we used its short form,
1198
+ .Op \-d .
1199
+ Many options have short forms; you can see them by running
1200
+ .RB \(oq "gifsicle \-\-help" \(cq.
1201
+ We also abbreviated
1202
+ .Op \-\-loopcount
1203
+ to
1204
+ .Op \-\-loop ,
1205
+ which is OK since no other option starts with \(oqloop\(cq.)
1206
+ .PP
1207
+ To explode \(oqanim.gif\(cq into its component frames:
1208
+ .Es
1209
+ \fBgifsicle \-\-explode anim.gif\fR
1210
+ .br
1211
+ \fBls anim.gif*\fR
1212
+ .br
1213
+ anim.gif anim.gif.000 anim.gif.001 anim.gif.002 anim.gif.003
1214
+ .Ee
1215
+ To optimize \(oqanim.gif\(cq:
1216
+ .Es
1217
+ \fBgifsicle \-b \-O2 anim.gif\fR
1218
+ .Ee
1219
+ To change the second frame of \(oqanim.gif\(cq to \(oqx.gif\(cq:
1220
+ .Es
1221
+ \fBgifsicle \-b \-\-unoptimize \-O2 anim.gif \-\-replace "#1" x.gif\fR
1222
+ .Ee
1223
+ .Op \-\-unoptimize
1224
+ is used since \(oqanim.gif\(cq was optimized in the last step. Editing
1225
+ individual frames in optimized GIFs is dangerous without
1226
+ .Op \-\-unoptimize ;
1227
+ frames following the changed frame could be corrupted by the change.
1228
+ Of course, this might be what you want.
1229
+ .PP
1230
+ Note that
1231
+ .Op \-\-unoptimize
1232
+ and
1233
+ .Op \-\-optimize
1234
+ can be on simultaneously.
1235
+ .Op \-\-unoptimize
1236
+ affects
1237
+ .I input
1238
+ GIF files, while
1239
+ .Op \-\-optimize
1240
+ affects
1241
+ .I output
1242
+ GIF files.
1243
+ .PP
1244
+ To print information about the first and fourth frames of \(oqanim.gif\(cq:
1245
+ .Es
1246
+ \fBgifsicle \-I "#0" "#3" < anim.gif\fR
1247
+ .Ee
1248
+ To make black the transparent color in all the GIFs in the current
1249
+ directory, and also print information about each:
1250
+ .Es
1251
+ \fBgifsicle \-bII \-\-trans "#000000" *.gif\fR
1252
+ .Ee
1253
+ Giving
1254
+ .Op \-I
1255
+ twice forces normal output to occur. With only one
1256
+ .Op \-I ,
1257
+ the GIFs would not be modified.
1258
+ .PP
1259
+ To change \(oqanim.gif\(cq to use a 64-color subset of the Web-safe palette:
1260
+ .Es
1261
+ \fBgifsicle \-b \-\-colors=64 \-\-use\-col=web anim.gif\fR
1262
+ .Ee
1263
+ To make a dithered black-and-white version of \(oqanim.gif\(cq:
1264
+ .Es
1265
+ \fBgifsicle \-\-dither \-\-use\-col=bw anim.gif > anim-bw.gif\fR
1266
+ .Ee
1267
+ .PP
1268
+ To overlay one GIF atop another\*Eproducing a one-frame output GIF that
1269
+ looks like the superposition of the two inputs\*Euse
1270
+ .B gifsicle
1271
+ twice:
1272
+ .Es
1273
+ \fBgifsicle bottom.gif top.gif | gifsicle \-U "#1" > result.gif\fR
1274
+ .Ee
1275
+ '
1276
+ .SH BUGS
1277
+ '
1278
+ Some optimized output GIFs may appear incorrectly on some GIF
1279
+ implementations (for example, Java's); see the
1280
+ .Op \-\-careful
1281
+ option.
1282
+ .PP
1283
+ Please email suggestions, additions, patches and bugs to
1284
+ ekohler@gmail.com.
1285
+ '
1286
+ .SH "SEE ALSO"
1287
+ '
1288
+ For a tutorial on GIF images and animations, you might try some of the
1289
+ resources listed on-line at webreference\%.com:
1290
+ .br
1291
+ http://www.webreference.com/authoring/graphics/animation\|.html
1292
+ '
1293
+ .SH AUTHORS
1294
+ .na
1295
+ Eddie Kohler <ekohler@gmail.com>
1296
+ .br
1297
+ http://www.read.seas.harvard.edu/~kohler/
1298
+ .br
1299
+ He wrote it.
1300
+ .PP
1301
+ Anne Dudfield <annied@frii.com>
1302
+ .br
1303
+ http://www.frii.com/~annied/
1304
+ .br
1305
+ She named it.
1306
+ .PP
1307
+ Hans Dinsen-Hansen <dino@danbbs.dk>
1308
+ .br
1309
+ http://www.danbbs.dk/~dino/
1310
+ .br
1311
+ Adaptive tree method for GIF writing.
1312
+ .PP
1313
+ http://www.lcdf.org/gifsicle/
1314
+ .br
1315
+ The
1316
+ .B gifsicle
1317
+ home page.
1318
+ '