Pnmdepth User Manual(0)                 Pnmdepth User Manual(0)



Table Of Contents


NAME
       pnmdepth - change the maxval in a PNM image


SYNOPSIS
       pnmdepth

       newmaxval

       [pnmfile]


DESCRIPTION
       This program is part of Netpbm(1).

       pnmdepth  reads  a  PNM  image  as input, scales all the
       pixel values, and writes out the image with the new max-
       val.   Scaling  the colors down to a smaller maxval will
       result in some loss of information.

       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.

       One important use of pnmdepth is to convert a new format
       2-byte-per-sample  PNM file to the older 1-byte-per-sam-
       ple 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 newmaxval less than 256, the resulting
       file should be readable by any program that worked  with
       PNM files before April 2000.


SEE ALSO
       pnm(1), pnmquant(1), ppmdither(1)


AUTHOR
       Copyright (C) 1989, 1991 by Jef Poskanzer.



netpbm documentation     08 April 2000  Pnmdepth User Manual(0)
