{
    "content": [
        {
            "type": "text",
            "text": "# ppmquant (man)\n\n## TLDR\n\n> This command has been replaced by `pnmquant` and `pnmremap`.\n\n- View documentation for `pnmquant`:\n  `tldr pnmquant`\n- View documentation for `pnmremap`:\n  `tldr pnmremap`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** ppmquant - quantize the colors in a portable pixmap down to a specified number\n\n**Synopsis:** ppmquant [-floyd|-fs] ncolors [ppmfile]\nppmquant [-floyd|-fs] [-nofloyd|-nofs] -mapfile mapfile [ppmfile]\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## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | — | — |  |\n\n## See Also\n\n- pnmquant(1)\n- ppmquantall(1)\n- pnmdepth(1)\n- ppmdither(1)\n- ppm(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (8 lines)\n- **DESCRIPTION** (37 lines) — 1 subsections\n  - -nofloyd -nofs (1 lines)\n- **REFERENCES** (4 lines)\n- **SEE ALSO** (3 lines)\n- **AUTHOR** (5 lines)\n\n## Full Content\n\n### NAME\n\nppmquant - quantize the colors in a portable pixmap down to a specified number\n\n### SYNOPSIS\n\nppmquant [-floyd|-fs] ncolors [ppmfile]\nppmquant [-floyd|-fs] [-nofloyd|-nofs] -mapfile mapfile [ppmfile]\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\npnmquant  is  a  newer,  more general program that is backward compatible with ppmquant.  pp‐‐\nmquant may be faster, though.\n\nReads a PPM image as input.  Chooses ncolors colors to best represent the image, maps the ex‐\nisting colors to the new ones, and writes a PPM image as output.\n\nThe quantization method is Heckbert's \"median cut\".\n\nAlternately,  you  can skip the color-choosing step by specifying your own set of colors with\nthe -mapfile option.  The mapfile is just a ppm file; it can be any shape, all  that  matters\nis  the  colors  in it.  For instance, to quantize down to the 8-color IBM TTL color set, you\nmight use:\nP3\n8 1\n255\n0   0   0\n255   0   0\n0 255   0\n0   0 255\n255 255   0\n255   0 255\n0 255 255\n255 255 255\nIf you want to quantize one image to use the colors in another one, just use the  second  one\nas  the  mapfile.  You don't have to reduce it down to only one pixel of each color, just use\nit as is.\n\nIf you use a mapfile, the output image has the same maxval as the  mapfile.   Otherwise,  the\noutput  maxval  is the same as the input maxval, or less in some cases where the quantization\nprocess reduces the necessary resolution.\n\n\nThe -floyd/-fs option enables a Floyd-Steinberg error diffusion step.  Floyd-Steinberg  gives\nvastly  better results on images where the unmodified quantization has banding or other arti‐\nfacts, especially when going to a small number of colors such as the above IBM set.  However,\nit does take substantially more CPU time, so the default is off.\n\n#### -nofloyd -nofs\n\n### REFERENCES\n\n\"Color  Image  Quantization for Frame Buffer Display\" by Paul Heckbert, SIGGRAPH '82 Proceed‐\nings, page 297.\n\n### SEE ALSO\n\npnmquant(1), ppmquantall(1), pnmdepth(1), ppmdither(1), ppm(5)\n\n### AUTHOR\n\nCopyright (C) 1989, 1991 by Jef Poskanzer.\n\n\n\n12 January 1991                               ppmquant(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "ppmquant",
        "section": "",
        "mode": "man",
        "summary": "ppmquant - quantize the colors in a portable pixmap down to a specified number",
        "synopsis": "ppmquant [-floyd|-fs] ncolors [ppmfile]\nppmquant [-floyd|-fs] [-nofloyd|-nofs] -mapfile mapfile [ppmfile]\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": "This command has been replaced by `pnmquant` and `pnmremap`.",
        "tldr_examples": [
            {
                "description": "View documentation for `pnmquant`",
                "command": "tldr pnmquant"
            },
            {
                "description": "View documentation for `pnmremap`",
                "command": "tldr pnmremap"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": ""
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pnmquant",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmquant/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": "ppm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/ppm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 37,
                "subsections": [
                    {
                        "name": "-nofloyd -nofs",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "REFERENCES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ppmquant - quantize the colors in a portable pixmap down to a specified number\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "ppmquant [-floyd|-fs] ncolors [ppmfile]\nppmquant [-floyd|-fs] [-nofloyd|-nofs] -mapfile mapfile [ppmfile]\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",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pnmquant  is  a  newer,  more general program that is backward compatible with ppmquant.  pp‐‐\nmquant may be faster, though.\n\nReads a PPM image as input.  Chooses ncolors colors to best represent the image, maps the ex‐\nisting colors to the new ones, and writes a PPM image as output.\n\nThe quantization method is Heckbert's \"median cut\".\n\nAlternately,  you  can skip the color-choosing step by specifying your own set of colors with\nthe -mapfile option.  The mapfile is just a ppm file; it can be any shape, all  that  matters\nis  the  colors  in it.  For instance, to quantize down to the 8-color IBM TTL color set, you\nmight use:\nP3\n8 1\n255\n0   0   0\n255   0   0\n0 255   0\n0   0 255\n255 255   0\n255   0 255\n0 255 255\n255 255 255\nIf you want to quantize one image to use the colors in another one, just use the  second  one\nas  the  mapfile.  You don't have to reduce it down to only one pixel of each color, just use\nit as is.\n\nIf you use a mapfile, the output image has the same maxval as the  mapfile.   Otherwise,  the\noutput  maxval  is the same as the input maxval, or less in some cases where the quantization\nprocess reduces the necessary resolution.\n\n\nThe -floyd/-fs option enables a Floyd-Steinberg error diffusion step.  Floyd-Steinberg  gives\nvastly  better results on images where the unmodified quantization has banding or other arti‐\nfacts, especially when going to a small number of colors such as the above IBM set.  However,\nit does take substantially more CPU time, so the default is off.\n",
                "subsections": [
                    {
                        "name": "-nofloyd -nofs",
                        "content": ""
                    }
                ]
            },
            "REFERENCES": {
                "content": "\"Color  Image  Quantization for Frame Buffer Display\" by Paul Heckbert, SIGGRAPH '82 Proceed‐\nings, page 297.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pnmquant(1), ppmquantall(1), pnmdepth(1), ppmdither(1), ppm(5)\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Copyright (C) 1989, 1991 by Jef Poskanzer.\n\n\n\n12 January 1991                               ppmquant(1)",
                "subsections": []
            }
        }
    }
}