# phpman > man > pnmdepth(1)

> **TLDR:** This command is an alias of `pamdepth`.
>
- View documentation for the original command:
  `tldr pamdepth`

*Source: tldr-pages*

---

[pnmdepth(1)](https://www.chedong.com/phpMan.php/man/pnmdepth/1/markdown)                            General Commands Manual                           [pnmdepth(1)](https://www.chedong.com/phpMan.php/man/pnmdepth/1/markdown)



## NAME
       pnmdepth - change the maxval in a portable anymap

## SYNOPSIS
       **pnmdepth** _newmaxval_ [_pnmfile_]

## DESCRIPTION
       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  in‐
       formation.

       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-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 _newmaxval_ less than 256, the resulting file should be readable by any pro‐
       gram that worked with PNM files before April 2000.


## SEE ALSO
       [pnm(5)](https://www.chedong.com/phpMan.php/man/pnm/5/markdown), [ppmquant(1)](https://www.chedong.com/phpMan.php/man/ppmquant/1/markdown), [ppmdither(1)](https://www.chedong.com/phpMan.php/man/ppmdither/1/markdown)

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



                                            08 April 2000                                [pnmdepth(1)](https://www.chedong.com/phpMan.php/man/pnmdepth/1/markdown)
