{
    "mode": "info",
    "parameter": "rawtoppm",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/rawtoppm/json",
    "generated": "2026-07-05T23:46:07Z",
    "synopsis": "rawtoppm [-headerskip N] [-rowskip N] [-rgb|-rbg|-grb |-gbr|-brg|-bgr ]\n[-interpixel|-interrow] width height [imagedata]",
    "sections": {
        "NAME": {
            "content": "rawtoppm - convert raw RGB bytes into a portable pixmap\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "rawtoppm [-headerskip N] [-rowskip N] [-rgb|-rbg|-grb |-gbr|-brg|-bgr ]\n[-interpixel|-interrow] width height [imagedata]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads raw RGB bytes as input.  Produces a portable  pixmap  as  output.\nThe  input  file  is just RGB bytes.  You have to specify the width and\nheight on the command line, since the program obviously can't get  them\nfrom  the file.  The maxval is assumed to be 255.  If the resulting im-\nage is upside down, run it through pnmflip -tb .\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-headerskip",
                    "content": "If the file has a header, you can use this flag to skip over it.\n"
                },
                {
                    "name": "-rowskip",
                    "content": "If there is padding at the ends of the rows,  you  can  skip  it\nwith this flag.\n\n-rgb -rbg -grb -gbr -brg -bgr\nThese flags let you specify alternate color orders.  The default\nis -rgb.\n\n-interpixel -interrow\nThese flags let you specify how the colors are interleaved.  The\ndefault is -interpixel, meaning interleaved by pixel.  A byte of\nred, a byte of green, and a byte of blue, or whatever color  or-\nder  you  specified.  -interrow means interleaved by row - a row\nof red, a row of green, a row of  blue,  assuming  standard  rgb\ncolor  order.   An  -interplane flag  - all the red pixels, then\nall the green, then all the blue - would be  an  obvious  exten-\nsion,  but is not implemented.  You could get the same effect by\nsplitting the file into three parts (perhaps using dd),  turning\neach part into a PGM file with rawtopgm, and then combining them\nwith rgb3toppm.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "ppm(5), rawtopgm(1), rgb3toppm(1), pnmflip(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright (C) 1991 by Jef Poskanzer.\n\n06 February 1991                    rawtoppm(1)",
            "subsections": []
        }
    },
    "summary": "rawtoppm - convert raw RGB bytes into a portable pixmap",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "If the file has a header, you can use this flag to skip over it."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "If there is padding at the ends of the rows, you can skip it with this flag. -rgb -rbg -grb -gbr -brg -bgr These flags let you specify alternate color orders. The default is -rgb. -interpixel -interrow These flags let you specify how the colors are interleaved. The default is -interpixel, meaning interleaved by pixel. A byte of red, a byte of green, and a byte of blue, or whatever color or- der you specified. -interrow means interleaved by row - a row of red, a row of green, a row of blue, assuming standard rgb color order. An -interplane flag - all the red pixels, then all the green, then all the blue - would be an obvious exten- sion, but is not implemented. You could get the same effect by splitting the file into three parts (perhaps using dd), turning each part into a PGM file with rawtopgm, and then combining them with rgb3toppm."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "ppm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/ppm/5/json"
        },
        {
            "name": "rawtopgm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/rawtopgm/1/json"
        },
        {
            "name": "rgb3toppm",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/rgb3toppm/1/json"
        },
        {
            "name": "pnmflip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmflip/1/json"
        }
    ]
}