Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 0cb0f8111d83618bc5865e023b7305f9 > files > 7

optipng-0.6.3-1mdv2010.0.i586.rpm

<!-- Creator     : groff version 1.19.2 -->
<!-- CreationDate: Sun May 17 23:55:04 2009 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p     { margin-top: 0; margin-bottom: 0; }
       pre   { margin-top: 0; margin-bottom: 0; }
       table { margin-top: 0; margin-bottom: 0; }
</style>
<title>OPTIPNG</title>

</head>
<body>

<h1 align=center>OPTIPNG</h1>

<hr>


<a name="NAME"></a>
<h2>NAME</h2>


<p style="margin-left:11%; margin-top: 1em"><b>OptiPNG</b>
&minus; Advanced optimization program for <b>Portable
Network Graphics (PNG)</b></p>

<a name="SYNOPSIS"></a>
<h2>SYNOPSIS</h2>


<p style="margin-left:11%; margin-top: 1em"><b>optipng</b>
[<b>&minus;?</b> | <b>&minus;h</b> | <b>&minus;help</b>]
<b><br>
optipng</b> [<i>options...</i>] <i>files...</i></p>

<a name="DESCRIPTION"></a>
<h2>DESCRIPTION</h2>


<p style="margin-left:11%; margin-top: 1em">The
<b>OptiPNG</b> program shall attempt to <i>optimize</i> PNG
files, i.e. reduce their size to a minimum, without losing
any information. In addition, this program shall perform a
suite of auxiliary functions like integrity checks, metadata
recovery and pixmap-to-PNG conversion.</p>

<p style="margin-left:11%; margin-top: 1em">The
optimization attempts are not guaranteed to succeed. Valid
PNG files that cannot be optimized by this program are
normally left intact; their size will not grow. The user may
request to override this default behavior.</p>

<a name="FILES"></a>
<h2>FILES</h2>


<p style="margin-left:11%; margin-top: 1em">The input files
are raster image files encoded either in PNG format (the
native format), or in an external format. The currently
supported external formats are GIF, BMP, PNM and TIFF.</p>

<p style="margin-left:11%; margin-top: 1em"><b>OptiPNG</b>
processes each image file given in the command line as
follows:</p>

<p style="margin-left:11%; margin-top: 1em">&minus; If it
is in PNG format:</p>

<p style="margin-left:22%; margin-top: 1em">Attempt to
optimize the given file in-place. If optimization is
successful, or if the option <b>&minus;force</b> is in
effect, replace the original file with its optimized
version. The original file is backed up if the option
<b>&minus;keep</b> is in effect.</p>

<p style="margin-left:11%; margin-top: 1em">&minus; If it
is in an external format:</p>

<p style="margin-left:22%; margin-top: 1em">Create an
optimized PNG version of the given file. The output file
name is composed from the original file name and the
<tt>.png</tt> extension.</p>

<a name="OPTIONS"></a>
<h2>OPTIONS</h2>


<p style="margin-left:11%; margin-top: 1em"><b>General
options <br>
-?</b>, <b>&minus;h</b>, <b>&minus;help</b></p>

<p style="margin-left:22%;">Show a complete summary of
options.</p>

<p style="margin-left:11%;"><b>&minus;o</b>
<i>level</i></p>

<p style="margin-left:22%;">Select the optimization level.
<br>
Use <b>&minus;o0</b> to disable IDAT recompression trials.
This option has no effect on non-PNG input files. <br>
Use <b>&minus;o1</b> to enable a single IDAT recompression
trial. <br>
Use a higher <i>level</i> to enable more trials (the higher
the <i>level</i>, the more trials). <br>
The behavior and the default value of this option may change
across different program versions. Use option
<b>&minus;h</b> to see the details pertaining to your
specific version.</p>

<p style="margin-left:11%;"><b>&minus;dir</b>
<i>directory</i></p>

<p style="margin-left:22%;">Write output file(s) to
<i>directory</i>.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="6%">



<p style="margin-top: 1em" valign="top"><b>&minus;fix</b></p> </td>
<td width="5%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Enable error
recovery. This option has no effect on valid input
files.</p> </td>
</table>

<p style="margin-left:22%;">The program will spend a
reasonable amount of effort to recover as much data as
possible, without increasing the output file size, but the
success cannot be generally guaranteed. The program may even
increase the file size, e.g., by reconstructing missing
critical data. Under this option, integrity shall take
precedence over file size. <br>
When this option is not used, the invalid input files are
left unprocessed.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">



<p style="margin-top: 1em" valign="top"><b>&minus;force</b></p> </td>
<td width="2%"></td>
<td width="56%">


<p style="margin-top: 1em" valign="top">Enforce writing of
a new output file.</p></td>
<td width="22%">
</td>
</table>

<p style="margin-left:22%;">Use this option to override the
program&rsquo;s decision not to write such file, e.g. when
the PNG input is digitally signed (using dSIG), or when the
PNG output becomes larger than the PNG input.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="7%">



<p style="margin-top: 1em" valign="top"><b>&minus;keep</b></p> </td>
<td width="4%"></td>
<td width="58%">


<p style="margin-top: 1em" valign="top">Keep a backup of
the modified file(s).</p></td>
<td width="20%">
</td>
</table>

<p style="margin-left:22%;">The files that use the backup
names prior to the program execution are <i>not</i>
overwritten.</p>

<p style="margin-left:11%;"><b>&minus;log</b>
<i>file</i></p>

<p style="margin-left:22%;">Log messages to <i>file</i>.
For safety reasons, <i>file</i> must have the extension
<tt>.log</tt>.</p>

<p style="margin-left:11%;"><b>&minus;out</b>
<i>file</i></p>

<p style="margin-left:22%;">Write output file to
<i>file</i>. The command line must contain exactly one input
file.</p>

<p style="margin-left:11%;"><b>&minus;preserve</b></p>

<p style="margin-left:22%;">Preserve file attributes (time
stamps, file access rights, etc.) where applicable.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">



<p style="margin-top: 1em" valign="top"><b>&minus;quiet</b></p> </td>
<td width="2%"></td>
<td width="27%">


<p style="margin-top: 1em" valign="top">Run in quiet
mode.</p> </td>
<td width="51%">
</td>
</table>

<p style="margin-left:22%;">These messages are still
written to the log file if the option <b>&minus;log</b> is
in effect.</p>

<p style="margin-left:11%;"><b>&minus;simulate</b></p>

<p style="margin-left:22%;">Run in simulation mode: perform
the trials, but do not create output files.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="7%">



<p style="margin-top: 1em" valign="top"><b>&minus;snip</b></p> </td>
<td width="4%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Cut one image out
of multi-image, animation or video file(s).</p></td>
</table>

<p style="margin-left:22%;">Depending on the input format,
this may be either the first or the most relevant (e.g. the
largest) image.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;v</b></p> </td>
<td width="8%"></td>
<td width="63%">


<p style="margin-top: 1em" valign="top">Enable the options
<b>&minus;verbose</b> and <b>&minus;version</b>.</p></td>
<td width="15%">
</td>
</table>

<p style="margin-left:11%;"><b>&minus;verbose</b></p>

<p style="margin-left:22%;">Run in verbose mode.</p>

<p style="margin-left:11%;"><b>&minus;version</b></p>

<p style="margin-left:22%;">Show copyright, version and
build info.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">



<p style="margin-top: 1em" valign="top"><b>&minus;&minus;</b></p> </td>
<td width="8%"></td>
<td width="41%">


<p style="margin-top: 1em" valign="top">Stop option switch
parsing.</p> </td>
<td width="37%">
</td>
</table>

<p style="margin-left:11%; margin-top: 1em"><b>PNG encoding
and optimization options <br>
&minus;f</b> <i>filters</i></p>

<p style="margin-left:22%;">Select the PNG delta filters.
<br>
The <i>filters</i> argument is specified as a rangeset (e.g.
<b>&minus;f0&minus;5</b>), and the default <i>filters</i>
value depends on the optimization level set by the option
<b>&minus;o</b>. <br>
The filter values 0, 1, 2, 3 and 4 indicate static
filtering, and correspond to the standard PNG filter codes
(<i>None</i>, <i>Left</i>, <i>Up</i>, <i>Average</i> and
<i>Paeth</i>, respectively). The filter value 5 indicates
adaptive filtering, whose effect is defined by the
<b>libpng</b>(3) library used by <b>OptiPNG</b>.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="7%">



<p style="margin-top: 1em" valign="top"><b>&minus;full</b></p> </td>
<td width="4%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Produce a full
report on IDAT. This option might slow down the trials.</p></td>
</table>

<p style="margin-left:11%;"><b>&minus;i</b> <i>type</i></p>

<p style="margin-left:22%;">Select the interlace type
(0&minus;1). <br>
Use <b>&minus;i0</b> to produce a non-interlaced output.
<br>
Use <b>&minus;i1</b> to produce an interlaced (<i>Adam7</i>)
output. <br>
By default, the output will have the same interlace type as
the input.</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;nb</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Do not apply bit
depth reduction.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;nc</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Do not apply color
type reduction.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;np</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Do not apply
palette reduction.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="4%">



<p style="margin-top: 1em" valign="top"><b>&minus;nz</b></p> </td>
<td width="7%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Do not perform IDAT
recompression (also disable reductions).</p></td>
</table>

<p style="margin-left:11%;"><b>&minus;zc</b>
<i>levels</i></p>

<p style="margin-left:22%;">Select the zlib compression
levels used in IDAT compression. <br>
The <i>levels</i> argument is specified as a rangeset (e.g.
<b>&minus;zc6&minus;9</b>), and the default <i>levels</i>
value depends on the optimization level set by the option
<b>&minus;o</b>. <br>
The effect of this option is defined by the <b>zlib</b>(3)
library used by <b>OptiPNG</b>.</p>

<p style="margin-left:11%;"><b>&minus;zm</b>
<i>levels</i></p>

<p style="margin-left:22%;">Select the zlib memory levels
used in IDAT compression. <br>
The <i>levels</i> argument is specified as a rangeset (e.g.
<b>-zm8&minus;9</b>), and the default <i>levels</i> value
depends on the optimization level set by the option
<b>&minus;o</b>. <br>
The effect of this option is defined by the <b>zlib</b>(3)
library used by <b>OptiPNG</b>.</p>

<p style="margin-left:11%;"><b>&minus;zs</b>
<i>strategies</i></p>

<p style="margin-left:22%;">Select the zlib compression
strategies used in IDAT compression. <br>
The <i>strategies</i> argument is specified as a rangeset
(e.g. <b>-zs0&minus;3</b>), and the default
<i>strategies</i> value depends on the optimization level
set by the option <b>&minus;o</b>. <br>
The effect of this option is defined by the <b>zlib</b>(3)
library used by <b>OptiPNG</b>.</p>

<p style="margin-left:11%;"><b>&minus;zw</b>
<i>size</i></p>

<p style="margin-left:22%;">Select the zlib window size
(32k,16k,8k,4k,2k,1k,512,256) used in IDAT compression. <br>
The <i>size</i> argument can be specified either in bytes
(e.g. 16384) or kilobytes (e.g. 16k). The default
<i>size</i> value is set to the lowest window size that
yields an IDAT output as big as if yielded by the value
32768. <br>
The effect of this option is defined by the <b>zlib</b>(3)
library used by <b>OptiPNG</b>.</p>

<p style="margin-left:11%; margin-top: 1em"><b>Notes</b>
<br>
Options may come in any order (except for
<b>&minus;&minus;</b>), before, after, or alternating with
file names. Option names are case-insensitive and may be
abbreviated to their shortest unique prefix.</p>

<p style="margin-left:11%; margin-top: 1em">Some options
may have arguments that follow the option name, separated by
whitespace or the equal sign (&rsquo;<b>=</b>&rsquo;). If
the option argument is a number or a rangeset, the separator
may be omitted. For example:</p>


<p style="margin-left:22%; margin-top: 1em"><b>&minus;out</b>
<tt>newfile.png</tt> &lt;=&gt;
<b>&minus;out=</b><tt>newfile.png</tt> <b><br>
&minus;o3</b> &lt;=&gt; <b>&minus;o&nbsp;3</b> &lt;=&gt;
<b>&minus;o=3 <br>
&minus;f0,3&minus;5</b> &lt;=&gt;
<b>&minus;f&nbsp;0,3&minus;5</b> &lt;=&gt;
<b>&minus;f=0,3&minus;5</b></p>

<p style="margin-left:11%; margin-top: 1em">Rangeset
arguments are cumulative; e.g.</p>

<p style="margin-left:22%; margin-top: 1em"><b>&minus;f0
&minus;f3&minus;5</b> &lt;=&gt; <b>&minus;f0,3&minus;5 <br>
&minus;zs0 &minus;zs1 &minus;zs2&minus;3</b> &lt;=&gt;
<b>&minus;zs0,1,2,3</b> &lt;=&gt;
<b>&minus;zs0&minus;3</b></p>

<a name="EXTENDED DESCRIPTION"></a>
<h2>EXTENDED DESCRIPTION</h2>


<p style="margin-left:11%; margin-top: 1em">The PNG
optimization algorithm consists of the following steps:</p>

<table width="100%" border=0 rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p style="margin-top: 1em" valign="top">1.</p></td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Reduce the bit
depth, the color type and the color palette of the image.
This step may reduce the size of the uncompressed image,
which, indirectly, may reduce the size of the compressed
image (i.e. the size of the output PNG file).</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p style="margin-top: 1em" valign="top">2.</p></td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Run a suite of
compression methods and strategies and select the
compression parameters that yield the smallest output
file.</p> </td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p style="margin-top: 1em" valign="top">3.</p></td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Store all IDAT
contents into a single chunk, eliminating the overhead
incurred by repeated IDAT headers and CRCs.</p></td>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">


<p style="margin-top: 1em" valign="top">4.</p></td>
<td width="8%"></td>
<td width="78%">


<p style="margin-top: 1em" valign="top">Set the zlib window
size inside IDAT to a mininum that does not affect the
compression ratio, reducing the memory requirements of PNG
decoders.</p> </td>
</table>

<p style="margin-left:11%; margin-top: 1em">Not all of the
above steps need to be executed. The behavior depends on the
actual input files and user options.</p>

<p style="margin-left:11%; margin-top: 1em">Step 1 may be
customized via the no-reduce options <b>&minus;nb</b>,
<b>&minus;nc</b> and <b>&minus;np</b>. Step 2 may be
customized via the <b>&minus;o</b> option, and may be
fine-tuned via the options <b>&minus;zc</b>,
<b>&minus;zm</b>, <b>&minus;zs</b> and <b>&minus;zw</b>.
Step 3 is always executed; for example, even though IDAT
recompression is disabled under <b>&minus;o0</b>, all IDAT
chunks from the input are concatenated into a single IDAT
chunk in the output. Step 4 is executed only if a new IDAT
is being created, and may be fine-tuned via the option
<b>&minus;zw</b>.</p>

<p style="margin-left:11%; margin-top: 1em">Extremely
exhaustive searches are not generally expected to yield
significant improvements in compression ratio, and are
recommended to advanced users only.</p>

<a name="EXAMPLES"></a>
<h2>EXAMPLES</h2>


<p style="margin-left:11%; margin-top: 1em"><tt>optipng
file1.png file2.gif file3.tif</tt></p>

<p style="margin-left:11%; margin-top: 1em"><tt>optipng
&minus;o5 file1.png file2.gif file3.tif</tt></p>

<p style="margin-left:11%; margin-top: 1em"><tt>optipng
&minus;i1 &minus;o7 &minus;v &minus;full &minus;sim
experiment.png &minus;log experiment.log</tt></p>

<a name="BUGS"></a>
<h2>BUGS</h2>


<p style="margin-left:11%; margin-top: 1em">Lossless image
reductions are not completely implemented. (This does NOT
affect the integrity of the output files.) Here are the
missing pieces:</p>

<p style="margin-left:22%; margin-top: 1em">&minus; The
color palette reductions are implemented only partially.
<br>
&minus; The bit depth reductions below 8, for grayscale
images, are not implemented yet.</p>

<p style="margin-left:11%; margin-top: 1em">TIFF support is
limited to uncompressed, PNG-compatible (grayscale, RGB and
RGBA) images.</p>

<p style="margin-left:11%; margin-top: 1em">Metadata is not
imported from the external image formats.</p>

<p style="margin-left:11%; margin-top: 1em">There is no
support for pipes or streams.</p>

<a name="SEE ALSO"></a>
<h2>SEE ALSO</h2>


<p style="margin-left:11%; margin-top: 1em"><b>png</b>(5),
<b>libpng</b>(3), <b>zlib</b>(3), <b>pngcrush</b>(1),
<b>pngrewrite</b>(1).</p>

<p style="margin-left:11%; margin-top: 1em">Glenn
Randers-Pehrson et al. <i>Portable Network Graphics (PNG)
Specification, Second Edition</i>. <br>
W3C Recommendation 10 November 2003; ISO/IEC IS 15948:2003
(E). <tt><br>
http://www.w3.org/TR/PNG/</tt></p>

<a name="AUTHOR"></a>
<h2>AUTHOR</h2>


<p style="margin-left:11%; margin-top: 1em"><b>OptiPNG</b>
is written and maintained by Cosmin Truta.</p>

<p style="margin-left:11%; margin-top: 1em">This manual
page was originally written by Nelson A. de Oliveira for the
Debian Project. It was later updated by Cosmin Truta, and is
now part of the <b>OptiPNG</b> distribution.</p>
<hr>
</body>
</html>