.TL Pamdepth User Manual .SH 1 pamdepth .LP Updated: 08 April 2000 .br Table Of Contents .SH 2 NAME .LP pamdepth - change the maxval in a Netpbm image .SH 2 SYNOPSIS .LP \fBpamdepth\fR \fInewmaxval\fR [\fInetpbmfile\fR] .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpamdepth\fR reads a Netpbm image 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. .LP This program works on multi-image streams. .LP 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. .LP One important use of \fBpamdepth\fR 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 \fInewmaxval\fR less than 256, the resulting file should be readable by any program that worked with PNM files before April 2000. .SH 2 SEE ALSO .LP pnm, pam, pnmquant, ppmdither ppmbrighten pamfunc .SH 2 HISTORY .LP .LP \fBpamdepth\fR was new in Netpbm 10.32 (February 2006). It replaced \fBpnmdepth\fR, by Jef Poskanzer. \fBpamdepth\fR is backward compatible with \fBpamdepth\fR and adds the ability to process arbitrary PAM images and the ability to process multi-image input streams. \fBpnmdepth\fR handled only PNM images and ignored all but the the first in any stream. .br \l'5i' .SH 2 Table Of Contents .LP .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu SEE ALSO .IP \(bu HISTORY .LP