{
    "content": [
        {
            "type": "text",
            "text": "# pgmtopbm (info)\n\n## NAME\n\npgmtopbm - convert a portable graymap into a portable bitmap\n\n## SYNOPSIS\n\npgmtopbm   [-floyd|-fs|-threshold   |-hilbert   |-dither8|-d8|-cluster3\n|-c3|-cluster4|-c4 |-cluster8|-c8] [-value val] [-clump size] [pgmfile]\n\n## DESCRIPTION\n\nReads a portable graymap as input.  Produces a portable bitmap as  out-\nput.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS**\n- **REFERENCES**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pgmtopbm",
        "section": "",
        "mode": "info",
        "summary": "pgmtopbm - convert a portable graymap into a portable bitmap",
        "synopsis": "pgmtopbm   [-floyd|-fs|-threshold   |-hilbert   |-dither8|-d8|-cluster3\n|-c3|-cluster4|-c4 |-cluster8|-c8] [-value val] [-clump size] [pgmfile]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "pbmreduce",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pbmreduce/1/json"
            },
            {
                "name": "pgm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pgm/5/json"
            },
            {
                "name": "pbm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pbm/5/json"
            },
            {
                "name": "pnmconvol",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmconvol/1/json"
            },
            {
                "name": "pnmscale",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmscale/1/json"
            },
            {
                "name": "pnmtops",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pnmtops/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "REFERENCES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pgmtopbm - convert a portable graymap into a portable bitmap\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pgmtopbm   [-floyd|-fs|-threshold   |-hilbert   |-dither8|-d8|-cluster3\n|-c3|-cluster4|-c4 |-cluster8|-c8] [-value val] [-clump size] [pgmfile]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Reads a portable graymap as input.  Produces a portable bitmap as  out-\nput.\n\nNote  that  there  is no pbmtopgm converter.  Any program that uses the\nNetpbm libraries to read PGM files, including virtually all programs in\nthe  Netpbm package, will read a PBM file automatically as if it were a\nPGM file.\n\nIf you are using a less intelligent program that expects PGM input, use\npnmdepth  to  convert  the  PBM  file  to PGM.  As long as the depth is\ngreater than 1, pnmdepth will generate PGM.  This less intelligent pro-\ngram quite probably is also not intelligent enough to deal with general\nmaxvals, so you should specify a depth of 255.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "The default quantization method is boustrophedonic Floyd-Steinberg  er-\nror  diffusion (-floyd or -fs).  Also available are simple thresholding\n(-threshold); Bayer's ordered dither (-dither8) with  a  16x16  matrix;\nand three different sizes of 45-degree clustered-dot dither (-cluster3,\n-cluster4, -cluster8).  A space filling curve halftoning  method  using\nthe Hilbert curve is also available.  (-hilbert);\n\nFloyd-Steinberg  will almost always give the best looking results; how-\never, looking good is not always what you want.  For instance,  thresh-\nolding  can  be  used  in a pipeline with the pnmconvol tool, for tasks\nlike edge and peak detection.   And  clustered-dot  dithering  gives  a\nnewspaper-ish look, a useful special effect.\n\nThe  -value  flag alters the thresholding value for Floyd-Steinberg and\nsimple thresholding.  It should be a  real  number  between  0  and  1.\nAbove 0.5 means darker images; below 0.5 means lighter.\n\nThe Hilbert curve method is useful for processing images before display\non devices that do not render individual pixels distinctly (like  laser\nprinters).  This  dithering  method  can  give  better results than the\ndithering usually done by the laser printers  themselves.   The  -clump\nflag alters the number of pixels in a clump. This is usually an integer\nbetween 2 and 100 (default 5). Smaller clump sizes smear the image less\nand are less grainy, but seem to loose some grey scale linearity. Typi-\ncally a PGM image will have to be scaled to fit on a laser printer page\n(2400 x 3000 pixels for an A4 300 dpi page), and then dithered to a PBM\nimage before being converted to a postscript file.  A printing pipeline\nmight  look something like: pnmscale -xysize 2400 3000 image.pgm | pgm-\ntopbm -hil | pnmtops -scale 0.25 > image.ps\n\nAll flags can be abbreviated to their shortest unique prefix.\n",
                "subsections": []
            },
            "REFERENCES": {
                "content": "The only reference you need for this stuff is \"Digital  Halftoning\"  by\nRobert Ulichney, MIT Press, ISBN 0-262-21009-6.\n\nThe  Hilbert curve space filling method is taken from \"Digital Halfton-\ning with Space Filling Curves\" by Luiz Velho, Computer Graphics  Volume\n25, Number 4, proceedings of SIGRAPH '91, page 81. ISBN 0-89791-436-8\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "pbmreduce(1), pgm(5), pbm(5), pnmconvol(1), pnmscale(1), pnmtops(1)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Copyright (C) 1989 by Jef Poskanzer.\n\n26 July 1988                      pgmtopbm(1)",
                "subsections": []
            }
        }
    }
}