{
    "mode": "man",
    "parameter": "pbmtomacp",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/pbmtomacp/json",
    "generated": "2026-10-26T03:26:23Z",
    "synopsis": "pbmtomacp [-left left]\n[-right right]\n[-top top]\n[-bottom bottom]\n[pbmfile]\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.",
    "sections": {
        "NAME": {
            "content": "pbmtomacp - convert a PBM image to a MacPaint file\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pbmtomacp [-left left]\n\n[-right right]\n\n[-top top]\n\n[-bottom bottom]\n\n[pbmfile]\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\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\npbmtomacp reads a PBM image as input and produces a MacPaint file as output.\n\nIf you do not specify pbmfile, pbmtomacp uses Standard Input.\n\nThe  generated  file  is  only  the data fork of a picture.  You will need a program such as\nmcvert to generate a Macbinary or a BinHex file that contains the  necessary  information  to\nidentify the file as a PNTG file to MacOS.\n\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In  addition  to  the options common to all programs based on libnetpbm (most notably -quiet,\nsee  Common Options ), pbmtomacp recognizes the following command line options:\n\n\n\n",
            "subsections": [
                {
                    "name": "-norle",
                    "content": "Paint image it produces.  This output, while not normal, conforms to MacPaint specifi‐\ncations and can be read by any MacPaint decoder without any special settings.\n\nThe only value of this option is testing and experimentation.  The option causes every\noutput image to contain exactly 53072 bytes, which is the theoretical maximum size for\na MacPaint image.\n\nWithout -norle, MacPaint compresses the image as much as possible and the output  size\ndepends on the nature of the input.\n\n"
                },
                {
                    "name": "-left  -right  -top -bottom",
                    "content": "vert.  The default is the whole file.  If the specified image is too large for a  Mac‐\nPaint-file,  pbmtomacp  cuts the image to fit, starting at the specified top left cor‐\nner.\n\nThese options exist for backward compatibility with an  unfortunate  original  design.\nThey  do the same thing that you can do in a more Netpbm-like way and more flexibly by\nprocessing the input through pamcut.\n\n\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "macptopbm(1), ppmtopict(1), pamcut(1), pbm(1), mcvert documentation\n\n",
            "subsections": []
        },
        "HISTORY": {
            "content": "pbmtomacp was added to Netpbm in 1988, written by Douwe van der Schaaf  (...!mcvax!uvapsy!vd‐\nschaaf).\n\nIn  2015,  Akira  Urushibata  replaced  the program with the current version, using different\nlogic and none of the original code.  The new version used the \"packed PBM\" facilities of the\nNetpbm library and the shhopt method of command line parsing.\n",
            "subsections": []
        },
        "DOCUMENT SOURCE": {
            "content": "This manual page was generated by the Netpbm tool 'makeman' from  HTML  source.   The  master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/pbmtomacp.html\n\nnetpbm documentation                        26 April 2015                   Pbmtomacp User Manual(1)",
            "subsections": []
        }
    },
    "summary": "pbmtomacp - convert a PBM image to a MacPaint file",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Paint image it produces. This output, while not normal, conforms to MacPaint specifi‐ cations and can be read by any MacPaint decoder without any special settings. The only value of this option is testing and experimentation. The option causes every output image to contain exactly 53072 bytes, which is the theoretical maximum size for a MacPaint image. Without -norle, MacPaint compresses the image as much as possible and the output size depends on the nature of the input."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "vert. The default is the whole file. If the specified image is too large for a Mac‐ Paint-file, pbmtomacp cuts the image to fit, starting at the specified top left cor‐ ner. These options exist for backward compatibility with an unfortunate original design. They do the same thing that you can do in a more Netpbm-like way and more flexibly by processing the input through pamcut."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "macptopbm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/macptopbm/1/json"
        },
        {
            "name": "ppmtopict",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/ppmtopict/1/json"
        },
        {
            "name": "pamcut",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pamcut/1/json"
        },
        {
            "name": "pbm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pbm/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert a PBM image to a MacPaint file.",
        "examples": [
            {
                "description": "Convert a PBM image to a MACP file",
                "command": "pbmtomacp {{path/to/image.pbm}} > {{path/to/output.macp}}"
            },
            {
                "description": "Do not compress the output file",
                "command": "pbmtomacp {{-n|-norle}} {{path/to/image.pbm}} > {{path/to/output.macp}}"
            }
        ]
    }
}