{
    "content": [
        {
            "type": "text",
            "text": "# pbmtopgm(1) (man)\n\n## TLDR\n\n> Convert a PBM image to PGM by averaging areas surrounding individual pixels.\n\n- Convert PBM image to PGM by averaging the `w`x`h`-sized area surrounding each pixel:\n  `pbmtopgm {{w}} {{h}} {{path/to/image.pbm}} > {{path/to/output.pgm}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** pbmtopgm - convert portable bitmap to portable graymap by averaging areas\n\n**Synopsis:** pbmtopgm width height [pbmfile]\n\n## See Also\n\n- netpbm(1)\n- pgmtopbm(1)\n- pbm(5)\n\n## Section Outline\n\n- **NAME** (3 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (18 lines)\n- **SEE ALSO** (3 lines)\n- **AUTHOR** (10 lines)\n\n## Full Content\n\n### NAME\n\npbmtopgm - convert portable bitmap to portable graymap by averaging areas\n\n### SYNOPSIS\n\npbmtopgm width height [pbmfile]\n\n### DESCRIPTION\n\npbmtopgm  reads  a  portable  bitmap  as  input.  It outputs a portable graymap in which each\npixel's gray level is the average the surrounding black and white  input  pixels.   The  sur‐\nrounding area is a rectangle of width by height pixels.\n\nIn other words, this is a convolution.  pbmtopgm is similar to a special case of pnmconvol.\n\nYou may need a ppmsmooth step after pbmtopgm.\n\npbmtopgm has the effect of anti-aliasing bitmaps which contain distinct line features.\n\npbmtopgm works best with odd sample width and heights.\n\nYou  don't need pbmtopgm just to use a PGM program on a PBM image.  Any PGM program (assuming\nit uses the Netpbm libraries to read the PGM input) takes PBM input as if it were  PGM,  with\nonly  the  mininum  and  maximum gray levels.  So unless your convolution rectangle is bigger\nthan one pixel, you're not gaining anything with a pbmtopgm step.\n\n### SEE ALSO\n\nnetpbm(1), pgmtopbm(1), pbm(5)\n\n### AUTHOR\n\nCopyright (C) 1990 by Angus Duggan Copyright (C) 1989 by Jef Poskanzer.\n\nPermission to use, copy, modify, and distribute this software and its documentation  for  any\npurpose and without fee is hereby granted, provided that the above copyright notice appear in\nall copies and that both that copyright notice and this permission notice appear in  support‐\ning documentation.  This software is provided \"as is\" without express or implied warranty.\n\n\n\n03 Sep 2001                                 pbmtopgm(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "pbmtopgm",
        "section": "1",
        "mode": "man",
        "summary": "pbmtopgm - convert portable bitmap to portable graymap by averaging areas",
        "synopsis": "pbmtopgm width height [pbmfile]",
        "tldr_summary": "Convert a PBM image to PGM by averaging areas surrounding individual pixels.",
        "tldr_examples": [
            {
                "description": "Convert PBM image to PGM by averaging the `w`x`h`-sized area surrounding each pixel",
                "command": "pbmtopgm {{w}} {{h}} {{path/to/image.pbm}} > {{path/to/output.pgm}}"
            }
        ],
        "tldr_source": "official",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "netpbm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/netpbm/1/json"
            },
            {
                "name": "pgmtopbm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pgmtopbm/1/json"
            },
            {
                "name": "pbm",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/pbm/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 18,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 10,
                "subsections": []
            }
        ]
    }
}