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

81 lines
2.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of pnmdepth</TITLE>
</HEAD><BODY>
<H1>pnmdepth</H1>
Section: User Commands (1)<BR>Updated: 08 April 2000<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>
pnmdepth - change the maxval in a portable anymap
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>pnmdepth</B>
<I>newmaxval</I>
[<I>pnmfile</I>]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
Reads a portable anymap as input.
Scales all the pixel values, and writes out the image with the new maxval.
Scaling the colors down to a smaller maxval will result in some loss
of information.
<P>
Be careful of off-by-one errors when choosing the new maxval.
For instance, if you want the color values to be five bits wide,
use a maxval of 31, not 32.
<P>
One important use of
<B>pnmdepth</B>
is to convert a new format 2-byte-per-sample PNM file to the older
1-byte-per-sample format. Before April 2000, essentially all raw
(binary) format PNM files had a maxval less than 256 and one byte per
sample, and many programs may rely on that. If you specify a
<I>newmaxval</I>
less than 256, the resulting file should be readable by any program
that worked with PNM files before April 2000.
<P>
<A NAME="lbAE">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="/cgi-bin/man/man2html?5+pnm">pnm</A>(5), <A HREF="/cgi-bin/man/man2html?1+ppmquant">ppmquant</A>(1), <A HREF="/cgi-bin/man/man2html?1+ppmdither">ppmdither</A>(1)
<A NAME="lbAF">&nbsp;</A>
<H2>AUTHOR</H2>
Copyright (C) 1989, 1991 by Jef Poskanzer.
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">SEE ALSO</A><DD>
<DT id="5"><A HREF="#lbAF">AUTHOR</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:24 GMT, March 31, 2021
</BODY>
</HTML>