{
    "mode": "man",
    "parameter": "pbmtoascii",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pbmtoascii/1/json",
    "generated": "2026-06-03T01:50:43Z",
    "synopsis": "pbmtoascii [-1x2|-2x4] [pbmfile]",
    "sections": {
        "NAME": {
            "content": "pbmtoascii - convert a portable bitmap into ASCII graphics\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pbmtoascii [-1x2|-2x4] [pbmfile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads a portable bitmap as input.  Produces a somewhat crude ASCII graphic as output.\n\nNote that there is no asciitopbm tool - this transformation is one-way.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "The -1x2 and -2x4 flags give you two alternate ways for the bits to get mapped to characters.\nWith 1x2, the default, each character represents a group of 1 bit  across  by  2  bits  down.\nWith -2x4, each character represents 2 bits across by 4 bits down.  With the 1x2 mode you can\nsee the individual bits, so it's useful for previewing small bitmaps on a non-graphics termi‐\nnal.   The  2x4  mode lets you display larger bitmaps on a standard 80-column display, but it\nobscures bit-level details.  2x4 mode is also good for displaying graymaps - \"pnmscale -width\n158 | pgmnorm | pgmtopbm -thresh\" should give good results.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pbm(5)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1988, 1992 by Jef Poskanzer.\n\n\n\n20 March 1992                              pbmtoascii(1)",
            "subsections": []
        }
    },
    "summary": "pbmtoascii - convert a portable bitmap into ASCII graphics",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "pbm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pbm/5/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert a PBM image to ASCII graphics.",
        "examples": [
            {
                "description": "Read a PBM file as input and produce an ASCII output",
                "command": "pbmtoascii {{path/to/input_file.pbm}}"
            },
            {
                "description": "Read a PBM file as input and save an ASCII output into a file",
                "command": "pbmtoascii {{path/to/input_file.pbm}} > {{path/to/output_file}}"
            },
            {
                "description": "Read a PBM file as input while setting the pixel mapping (defaults to 1x2)",
                "command": "pbmtoascii -{{1x2|2x4}} {{path/to/input_file.pbm}}"
            },
            {
                "description": "Display version",
                "command": "pbmtoascii {{-v|-version}}"
            }
        ]
    }
}