{
    "mode": "man",
    "parameter": "pnmtorast",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/pnmtorast/1/json",
    "generated": "2026-08-05T23:08:27Z",
    "synopsis": "pnmtorast [-standard|-rle] [pnmfile]",
    "sections": {
        "NAME": {
            "content": "pnmtorast - convert a PPM into a Sun rasterfile\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "pnmtorast [-standard|-rle] [pnmfile]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program is part of Netpbm(1).\n\npnmtorastreads a PPM image as input and produces a Sun rasterfile as output.\n\nColor  values  in  Sun rasterfiles are eight bits wide, so pnmtorast will automatically scale\ncolors to have a maxval of 255.  An extra pamdepth step is not necessary.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), pnmtorast recognizes the following command line options:\n\nAll options can be abbreviated to their shortest unique prefix.\n\n\n",
            "subsections": [
                {
                    "name": "-standard",
                    "content": "Forces the result to be in RTSTANDARD form.\n\n"
                },
                {
                    "name": "-rle",
                    "content": "Forces the result to be in RTBYTEENCODED, which is smaller but, well, less standard.\n\nThe default is -rle.\n\n\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "rasttopnm(1), pnm(1)\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1989, 1991 by Jef Poskanzer.\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/pnmtorast.html\n\nnetpbm documentation                       12 January 1991                  Pnmtorast User Manual(1)",
            "subsections": []
        }
    },
    "summary": "pnmtorast - convert a PPM into a Sun rasterfile",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Forces the result to be in RTSTANDARD form."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Forces the result to be in RTBYTEENCODED, which is smaller but, well, less standard. The default is -rle."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "rasttopnm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/rasttopnm/1/json"
        },
        {
            "name": "pnm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnm/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert a PNM file to a Sun rasterfile.",
        "examples": [
            {
                "description": "Convert a PNM image to a RAST image",
                "command": "pnmtorast {{path/to/input.pnm}} > {{path/to/output.rast}}"
            },
            {
                "description": "Force either `RT_STANDARD` or `RT_BYTE_ENCODED` form for the output",
                "command": "pnmtorast -{{standard|rle}} {{path/to/input.pnm}} > {{path/to/output.rast}}"
            }
        ]
    }
}