# pnmquantall - run Pnmquant on a bunch of files all at once, so they ... - man(1) - [phpMan]

> **TLDR:** Run `pnmquant` on multiple files at once such that they share a common colormap.
>
- Run `pnmquant` on multiple files with the specified parameters, overwriting the original files:
  `pnmquantall {{n_colors}} {{path/to/input1.pnm path/to/input2.pnm ...}}`
- Save the quantised images to files named the same as the input files, but with the specified extension appended:
  `pnmquantall {{-e|-ext}} {{extension}} {{n_colors}} {{path/to/input1.pnm path/to/input2.pnm ...}}`

*Source: tldr-pages*

---

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

## NAME
       pnmquantall - run Pnmquant on a bunch of files all at once, so they share a common colormap


## SYNOPSIS
### pnmquantall

       [**-ext _**extension_] _ncolors_ _netpbm_file_...

       Note  that the usual syntax rules for Netpbm programs _don't_ _apply_ to this program.  For exam‐
       ple, you can't abbreviate -ext and you can't put it anywhere on the line you want.



## DESCRIPTION
       This program is part of [**Netpbm**(1)](https://www.chedong.com/phpMan.php/man/Netpbm/1/markdown).

       **pnmquantall **takes a bunch of Netpbm image files as input, chooses _ncolors_ colors to best rep‐
       resent all of the images, maps the existing colors to the new ones, and **overwrites the  input**
       **files **with the new quantized versions.

       If  you  don't want to overwrite your input files, use the **-ext **option.  The output files are
       then named the same as the input files, plus a period and the extension text you specify.

       The purpose is this: Let's say you've got a dozen PPMs that you want to display on the screen
       all at the same time.  Your screen can only display 256 different colors, but the PPMs have a
       total of a thousand or so different colors.  For a single image you solve this  problem  with
       **pnmquant**; **pnmquantall **solves it for multiple images.

       Note that another approach to this problem is to pre-select a set of colors and then use **pnm‐**
       **remap **to separately quantize each PPM to that set.)

       This  is  a rather simple program that runs **pnmcolormap **and **pnmremap**.  If you are considering
       using it in a program of any sophistication, you should probably just run those programs  di‐
       rectly.   Even  if  you are typing it, you may want to do the steps manually because it gives
       you access to the various options of **pnmcolormap **and **pnmremap **for doing the quantization dif‐
       ferently.



## OPTIONS
       **pnmquantall **recognizes the following command line option:



### -ext _
              Specify an extension for the output files.  By default the input files  are  overwrit‐
              ten.


       **pnmquantall  **does  not  recognize  the options common to all programs based on libnetpbm (See
       [ Common Options](index.html#commonoptions) .)  However, the **-version **option works.


## SEE ALSO
       [**pnmquant**(1)](https://www.chedong.com/phpMan.php/man/pnmquant/1/markdown), [**pnmremap**(1)](https://www.chedong.com/phpMan.php/man/pnmremap/1/markdown), [**pnmcolormap**(1)](https://www.chedong.com/phpMan.php/man/pnmcolormap/1/markdown), [**pnm**(1)](https://www.chedong.com/phpMan.php/man/pnm/1/markdown)

## DOCUMENT SOURCE
       This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master
       documentation is at

              **<http://netpbm.sourceforge.net/doc/pnmquantall.html>**

netpbm documentation                        05 March 2012                 _Pnmquantall_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)
