1OPTIPNG(1)                  General Commands Manual                 OPTIPNG(1)
2
3
4

NAME

6       OptiPNG  -  Advanced optimization program for Portable Network Graphics
7       (PNG)
8

SYNOPSIS

10       optipng [-? | -h | -help]
11       optipng [options...] files...
12

DESCRIPTION

14       OptiPNG is a PNG optimizer that recompresses image files to  a  smaller
15       size  without  losing  any information.  In addition, this program per‐
16       forms a suite of useful  functions  like  integrity  checks,  meta-data
17       recovery and pixmap-to-PNG conversion.
18

FILES

20       The input files are image files of following types:
21
22       - Native format: PNG.
23
24       -  External  pixmap  formats  (currently  supported:  GIF, BMP, PNM and
25       TIFF).
26
27       OptiPNG processes each input file as follows:
28
29       - If it is a PNG file:
30
31              If it is possible to create an optimized version  of  the  given
32              PNG  file,  the  optimized  file  replaces the original one. The
33              original file can be backed up, at the user's option.
34
35       - Otherwise (i.e. if it is an external pixmap format):
36
37              An optimized PNG version of the given  image  file  is  created.
38              The  output file name is created from the original file name and
39              the .png extension.
40
41       For example:
42
43              optipng file1.png file2.gif
44
45       will create an optimized file1.png and an  optimized  file2.png.   (The
46       original  file1.png  is  replaced  by  the  optimized one; the original
47       file2.gif is left intact.)
48

OPTIONS

50   Basic options
51       -?, -h, -help
52              Show a complete summary of options.
53
54       -o level
55              Select the optimization level.
56              Use -o0 to disable IDAT recompression trials.
57              Use -o1 to enable a single IDAT recompression trial.
58              Use a higher level to enable more trials (the higher the  level,
59              the more trials).
60              The  behavior  and  the  default  value  of this user option may
61              change across different program versions. Use option -h  to  see
62              the details pertaining to your specific version.
63
64       -i type
65              Select the interlace type (0-1).
66              Use -i0 to produce a non-interlaced output.
67              Use -i1 to produce an interlaced (Adam7) output.
68              If this option is not used, the output will have the same inter‐
69              lace type as the input.
70
71       -k, -keep
72              Keep a backup of the modified file(s).
73              The files that use the backup names prior to the program  execu‐
74              tion are not overwritten.
75
76       -q, -quiet
77              Run in quiet mode.
78
79       -v     Run in verbose mode / Show copyright, version and build info.
80
81   Advanced options
82       -zc levels
83              Select the zlib compression levels.
84              The  behavior  and  the  default  value  of this user option may
85              change across different program versions. Use option -h  to  see
86              the details pertaining to your specific version.
87
88       -zm levels
89              Select the zlib memory levels.
90              The  behavior  and  the  default  value  of this user option may
91              change across different program versions. Use option -h  to  see
92              the details pertaining to your specific version.
93
94       -zs strategies
95              Select the zlib compression strategies.
96              The  behavior  and  the  default  value  of this user option may
97              change across different program versions. Use option -h  to  see
98              the details pertaining to your specific version.
99
100       -zw window size
101              Select the zlib window size (32k,16k,8k,4k,2k,1k,512,256).
102              The window size can be specified either in bytes (e.g. 16384) or
103              kilobytes (e.g. 16k).
104
105       -f filters
106              Select the PNG delta filters.
107              The behavior and the default  value  of  this  user  option  may
108              change  across  different program versions. The filter values 0,
109              1, 2, 3, 4 correspond to the PNG standard filters  (None,  Left,
110              Up,  Average and Paeth, respectively). The other values are used
111              to specify adaptive filtering. Use option -h to see the  details
112              pertaining to your specific version.
113
114       -nb    Do not apply bit depth reduction.
115
116       -nc    Do not apply color type reduction.
117
118       -np    Do not apply palette reduction.
119
120       -nz    Do not perform IDAT recompression (also disable reductions).
121
122       -fix   Enable error recovery.
123
124       -force Write  a  new  output  file, even if it is larger than the input
125              file.
126
127       -full  Produce a full report on IDAT.  This option might slow down  the
128              trials.
129
130       -preserve
131              Preserve file attributes (time stamps, file access rights, etc.)
132              where applicable.
133
134       -simulate
135              Run in simulation mode: perform the trials, but  do  not  create
136              output files.
137
138       -out file
139              Write  output  file  to file.  The command line must not contain
140              more than one input file.
141
142       -dir directory
143              Write output file(s) to directory.
144
145       -log file
146              Log messages to file.  For safety reasons, file  must  have  the
147              extension .log.
148
149       --     Stop option switch parsing.
150
151   Notes
152       The  option  names  are  case-insensitive  and can be abbreviated.  Any
153       abbreviation must uniquely identify the full option name and must be no
154       shorter  than  two  letters, unless one letter is explicitly permitted.
155       For example, -quiet can be abbreviated as -q  or  -qu  (because  -q  is
156       explicitly  mentioned in the list of possible options), while -preserve
157       can be abbreviated as -pr but not as -p.
158
159       Some options may have arguments that follow the option  name,  with  or
160       without a whitespace used as a separator; e.g.
161
162              optipng -i1 -o3 file.png  <=>  optipng -i 1 -o 3 file.png
163
164       Range arguments are cumulative; e.g.
165
166              -f0 -f3-5  <=>  -f0,3-5
167              -zs0 -zs1 -zs2-3  <=>  -zs0,1,2,3  <=>  -zs0-3
168
169       The  zlib  window  size is automatically set to a minimum that does not
170       affect the compression ratio.
171
172       The output files will have all IDAT in  a  single  chunk,  even  if  no
173       recompression is performed.
174
175       Extremely exhaustive searches are not generally recommended.
176

EXAMPLES

178       optipng file.png
179
180       optipng -o5 file.png
181
182       optipng -o7 file.png
183
184       optipng -i1 -o7 -v -full -sim experiment.png -log experiment.log
185

BUGS

187       Lossless  image  reductions are not completely implemented.  (This does
188       NOT affect the integrity of the output files.)  Here  are  the  missing
189       pieces:
190
191              - The color palette reductions are implemented only partially.
192              -  The  bit  depth reductions below 8, for grayscale images, are
193              not implemented yet.
194              - The gray(alpha)-to-palette reductions are not implemented yet.
195
196       BMP support is limited to uncompressed images.
197
198       TIFF support is limited to uncompressed, PNG-compatible (grayscale, RGB
199       and RGBA) images.
200
201       Metadata is not imported from the external image formats.
202

AUTHOR

204       OptiPNG is written and maintained by Cosmin Truta.
205
206       This  manual  page  was originally written by Nelson A. de Oliveira for
207       the Debian Project. It was later updated by Cosmin Truta,  and  is  now
208       part of the OptiPNG distribution.
209
210
211
212OptiPNG Version 0.5.5           28 January 2007                     OPTIPNG(1)
Impressum