{
    "mode": "man",
    "parameter": "pnmquantall",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pnmquantall/1/json",
    "generated": "2026-10-05T09:09:17Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "pnmquantall - run Pnmquant on a bunch of files all at once, so they share a common colormap\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "pnmquantall",
                    "content": "[-ext extension] ncolors netpbmfile...\n\nNote  that the usual syntax rules for Netpbm programs don't apply to this program.  For exam‐\nple, you can't abbreviate -ext and you can't put it anywhere on the line you want.\n\n\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\npnmquantall takes a bunch of Netpbm image files as input, chooses ncolors colors to best rep‐\nresent all of the images, maps the existing colors to the new ones, and overwrites the  input\nfiles with the new quantized versions.\n\nIf  you  don't want to overwrite your input files, use the -ext option.  The output files are\nthen named the same as the input files, plus a period and the extension text you specify.\n\nThe purpose is this: Let's say you've got a dozen PPMs that you want to display on the screen\nall at the same time.  Your screen can only display 256 different colors, but the PPMs have a\ntotal of a thousand or so different colors.  For a single image you solve this  problem  with\npnmquant; pnmquantall solves it for multiple images.\n\nNote that another approach to this problem is to pre-select a set of colors and then use pnm‐\nremap to separately quantize each PPM to that set.)\n\nThis  is  a rather simple program that runs pnmcolormap and pnmremap.  If you are considering\nusing it in a program of any sophistication, you should probably just run those programs  di‐\nrectly.   Even  if  you are typing it, you may want to do the steps manually because it gives\nyou access to the various options of pnmcolormap and pnmremap for doing the quantization dif‐\nferently.\n\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "pnmquantall recognizes the following command line option:\n\n\n",
            "subsections": [
                {
                    "name": "-ext _",
                    "content": "Specify an extension for the output files.  By default the input files  are  overwrit‐\nten.\n\n\npnmquantall  does  not  recognize  the options common to all programs based on libnetpbm (See\nCommon Options .)  However, the -version option works.\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "pnmquant(1), pnmremap(1), pnmcolormap(1), pnm(1)\n",
            "subsections": []
        },
        "DOCUMENT SOURCE": {
            "content": "This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/pnmquantall.html\n\nnetpbm documentation                        05 March 2012                 Pnmquantall User Manual(1)",
            "subsections": []
        }
    },
    "summary": "pnmquantall - run Pnmquant on a bunch of files all at once, so they share a common colormap",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "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 .) However, the -version option works."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "pnmquant",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmquant/1/json"
        },
        {
            "name": "pnmremap",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmremap/1/json"
        },
        {
            "name": "pnmcolormap",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmcolormap/1/json"
        },
        {
            "name": "pnm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Run `pnmquant` on multiple files at once such that they share a common colormap.",
        "examples": [
            {
                "description": "Run `pnmquant` on multiple files with the specified parameters, overwriting the original files",
                "command": "pnmquantall {{n_colors}} {{path/to/input1.pnm path/to/input2.pnm ...}}"
            },
            {
                "description": "Save the quantised images to files named the same as the input files, but with the specified extension appended",
                "command": "pnmquantall {{-e|-ext}} {{extension}} {{n_colors}} {{path/to/input1.pnm path/to/input2.pnm ...}}"
            }
        ]
    }
}