{
    "content": [
        {
            "type": "text",
            "text": "# pnmquant(1) (man)\n\n## TLDR\n\n> Quantize the colors in a PNM image into a smaller set.\n\n- Generate an image using only `n_colors` or less colors as close as possible to the input image:\n  `pnmquant {{n_colors}} {{path/to/input.pnm}} > {{path/to/output.pnm}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** pnmquant - quantize the colors in a Netpbm image to a smaller set\n\n**Synopsis:** pnmquant   [-center|-meancolor|-meanpixel]   [-floyd|-fs]   [-nofloyd|-nofs]  [-spreadbright‐‐\nness|-spreadluminosity] ncolors [pnmfile]\nAll options can be abbreviated to their shortest unique prefix.  You may use two hyphens  in‐\nstead  of one to designate an option.  You may use either white space or equals signs between\nan option name and its value.\n\n## See Also\n\n- pnmcolormap(1)\n- pnmremap(1)\n- ppmquantall(1)\n- pnmdepth(1)\n- ppmdither(1)\n- ppmquant(1)\n- pnm(5)\n\n## Section Outline\n\n- **NAME** (3 lines)\n- **SYNOPSIS** (8 lines)\n- **DESCRIPTION** (15 lines)\n- **SEE ALSO** (3 lines)\n- **AUTHOR** (5 lines)\n\n## Full Content\n\n### NAME\n\npnmquant - quantize the colors in a Netpbm image to a smaller set\n\n### SYNOPSIS\n\npnmquant   [-center|-meancolor|-meanpixel]   [-floyd|-fs]   [-nofloyd|-nofs]  [-spreadbright‐‐\nness|-spreadluminosity] ncolors [pnmfile]\n\nAll options can be abbreviated to their shortest unique prefix.  You may use two hyphens  in‐\nstead  of one to designate an option.  You may use either white space or equals signs between\nan option name and its value.\n\n### DESCRIPTION\n\nReads a PNM image as input.  Chooses ncolors colors to best represent the image, maps the ex‐\nisting colors to the new ones, and writes a PNM image as output.\n\nThis program is simply a combination of pnmcolormap and pnmremap, where the colors of the in‐\nput are remapped using a color map which is generated from the colors  in  that  same  input.\nThe  options  have  the same meaning as in those programs.  See their documentation to under‐\nstand pnmquant.\n\nIt is much faster to call pnmcolormap and pnmremap directly than to run  pnmquant.   pnmquant\nis just a convenience.\n\nppmquant  is  an older program which does the same thing as pnmquant, but on only PPM images.\nIt is, however, faster than either pnmquant or ppmcolormap/pnmremap.\n\n### SEE ALSO\n\npnmcolormap(1), pnmremap(1), ppmquantall(1), pnmdepth(1), ppmdither(1), ppmquant(1), pnm(5)\n\n### AUTHOR\n\nWritten by Bryan Henderson\n\n\n\n20 January 2002                               pnmquant(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "pnmquant",
        "section": "1",
        "mode": "man",
        "summary": "pnmquant - quantize the colors in a Netpbm image to a smaller set",
        "synopsis": "pnmquant   [-center|-meancolor|-meanpixel]   [-floyd|-fs]   [-nofloyd|-nofs]  [-spreadbright‐‐\nness|-spreadluminosity] ncolors [pnmfile]\nAll options can be abbreviated to their shortest unique prefix.  You may use two hyphens  in‐\nstead  of one to designate an option.  You may use either white space or equals signs between\nan option name and its value.",
        "tldr_summary": "Quantize the colors in a PNM image into a smaller set.",
        "tldr_examples": [
            {
                "description": "Generate an image using only `n_colors` or less colors as close as possible to the input image",
                "command": "pnmquant {{n_colors}} {{path/to/input.pnm}} > {{path/to/output.pnm}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "pnmcolormap",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmcolormap/1/json"
            },
            {
                "name": "pnmremap",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmremap/1/json"
            },
            {
                "name": "ppmquantall",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmquantall/1/json"
            },
            {
                "name": "pnmdepth",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmdepth/1/json"
            },
            {
                "name": "ppmdither",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmdither/1/json"
            },
            {
                "name": "ppmquant",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ppmquant/1/json"
            },
            {
                "name": "pnm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pnm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}