man-pages/man1/pngtopnm.1.html
2021-03-31 01:06:50 +01:00

179 lines
4.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of pngtopnm</TITLE>
</HEAD><BODY>
<H1>pngtopnm</H1>
Section: User Commands (1)<BR>Updated: 6 January 1997<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="ixAAB"></A>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
pngtopnm - convert a Portable Network Graphics file into portable anymap
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>pngtopnm</B>
[-verbose]
[-alpha | -mix]
[-background color]
<BR>
[-gamma value]
[-text file]
[-time]
[<I>pngfile</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
Reads a Portable Network Graphics as input.
<A NAME="ixAAC"></A>
Produces a portable anymap as output.
The type of the output file depends on the input file - if it's
black &amp; white, a
<I>pbm</I>
file is written, else if it's grayscale a
<I>pgm</I>
file, else a
<I>ppm</I>
file.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-verbose</B>
<DD>
Display the format of the input file and the type of the output file. If
the chunks are part of the
<I>png-file,</I>
the alpha, transparency and gamma-values will be indicated.
<DT id="2"><B>-alpha</B>
<DD>
Output the alpha channel or transparency mask of the image. The result is either a
<I>pbm</I>
file or
<I>pgm</I>
file, depending on whether different levels of transparency appear.
<DT id="3"><B>-mix</B>
<DD>
Compose the image with the transparency or alpha mask against a the
background. When a background chunk is available that color is taken,
else black will do.
<DT id="4"><B>-background color</B>
<DD>
If no background color chunck is present in the
<I>png-file,</I>
or when another color is required this parameter can be used to set the
background color of images. This is especially useful for alpha-channel
images or those with transparency chunks. The format, to specify the color in,
is either (in the case of orange) &quot;1.0,0.5,0.0&quot;, where the values are floats
between zero and one, or with the syntax &quot;#RGB&quot;, &quot;#RRGGBB&quot; or &quot;#RRRRGGGGBBBB&quot;
where R, G and B are hexa-decimal numbers.
<DT id="5"><B>-gamma value</B>
<DD>
Converts the image to a new display-gamma value. When a gAMA chunk is present
in the
<I>png-file,</I>
the image-gamma value will be used. When not, the image-gamma is considered
to be 1.0. Based on the image-gamma and the display-gamma given with this
option the colors written to the
<I>pnm-file</I>
will be adjusted.
<BR>
Because the gamma's of uncompensated monitors are around 2.6, which results
in an image-gamma of 0.45, some typical situations are:
when the image-gamma is 0.45 (use -verbose to check) and the picture is too
light, your system is gamma-corrected, so convert with &quot;-gamma 1.0&quot;.
When no gAMA chunk is present or the image-gamma is 1.0, use 2.2 to make the
picture lighter and 0.45 to make the picture darker.
<DT id="6"><B>-text file</B>
<DD>
Writes the tEXt and zTXt chunks to a file, in a format as described in the
<I>pnmtopng</I>
man-page. These chunks contain text comments or annotations.
<DT id="7"><B>-time</B>
<DD>
Prints the tIME chunk to stderr.
</DL>
<P>
All flags can be abbreviated to their shortest unique prefix.
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="/cgi-bin/man/man2html?1+pnmtopng">pnmtopng</A>(1), <A HREF="/cgi-bin/man/man2html?1+ptot">ptot</A>(1), <A HREF="/cgi-bin/man/man2html?1+pnmgamma">pnmgamma</A>(1), <A HREF="/cgi-bin/man/man2html?5+pnm">pnm</A>(5)
<A NAME="lbAG">&nbsp;</A>
<H2>NOTE</H2>
Instead of pngtopnm|pnmtoxxx, a specific converter should be used, if
available. E.g.
<I>ptot</I>
(PNG to TIFF conversion), etc.
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS</H2>
There could be an option to read the comment text from pnm comments instead
of a separate file.
<P>
The program could be much faster, with a bit of code optimizing.
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
Copyright (C) 1995-1997 by Alexander Lehmann
<BR>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and&nbsp;Willem&nbsp;van&nbsp;Schaik.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="8"><A HREF="#lbAB">NAME</A><DD>
<DT id="9"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="10"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="11"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="12"><A HREF="#lbAF">SEE ALSO</A><DD>
<DT id="13"><A HREF="#lbAG">NOTE</A><DD>
<DT id="14"><A HREF="#lbAH">BUGS</A><DD>
<DT id="15"><A HREF="#lbAI">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:23 GMT, March 31, 2021
</BODY>
</HTML>