RAWTOPPM(1)
π rawtoppm β the manual, but make it slay π
okay bestie, welcome to Rawtoppm User Manual, from the General Commands Manual section π this is a Netpbm girlie and she's here to turn your raw RGB bytes into a whole entire PPM image. no cap.
β¨ NAME β¨
rawtoppm β convert a stream of raw RGB bytes to a PPM image π¦
πΈ SYNOPSIS πΈ
rawtoppm
[-headerskip N]
[-rowskip N]
[ -rgb|-rbg|-grb |-gbr|-brg|-bgr ]
[-interpixel|-interrow] width height
[imagedata]
π DESCRIPTION π
so this program is part of Netpbm(1), bestie, keep up π
rawtoppm reads raw RGB bytes as input and produces a PPM image as output. the input file is literally just RGB bytes. nothing else. no lil header, no metadata, no vibe check β just bytes.
that's why you have to specify the width and height on the command line, because the program obviously can't get them from the file. it's not psychic, it's a converter π
rawtoppm assumes the maxval of the input samples is 255, and it makes the maxval of the output PPM 255 too. consistent queen behavior β¨
β οΈ big heads up:rawtoppmassumes the pixels come top first in the input stream. if they are actually bottom first, the resulting PPM is upside down π β so run it throughpamflip -tbto fix that. iykyk.
π OPTIONS π
on top of the options common to all programs based on libnetpbm (most notably -quiet, see Common Options), rawtoppm recognizes the following command line options:
-headerskipβ skip over this many bytes at the beginning of the input stream. use this when your input has some kind of header followed by a raster that's suitable forrawtoppm. basically: yeet the header, keep the pixels π«Ά-rowskipβ skip this many bytes at the end of each row of the raster. some input streams have padding at the end of rows, and this is how you politely ignore it π-rgb,-rbg,-grb,-gbr,-brg,-bgrβ this option specifies the order of the color components for each pixel. the default is-rgbπ-interpixel,-interrowβ these options 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 order you specified.-interrowmeans interleaved by row: a row of red, a row of green, a row of blue, assuming standard rgb color order π
π ngl, an-interplaneoption β all the red pixels, then all the green, then all the blue β would be an obvious extension, but it is not implemented. F in the chat. you could get the same effect by splitting the file into three parts (perhaps usingdd), turning each part into a PGM file withrawtopgm, and then combining them withrgb3toppm. girlboss workaround, honestly π
π₯ SEE ALSO π₯
ppm(1), rawtopgm(1), rgb3toppm(1), pamflip(1)
π AUTHOR π
Copyright (C) 1991 by Jef Poskanzer. iconic, we stan π
π DOCUMENT SOURCE π
this manual page was generated by the Netpbm tool makeman from HTML source. the master documentation is at
http://netpbm.sourceforge.net/doc/rawtoppm.html
aaaand that's the whole thing bestie π from netpbm documentation, dated 06 February 1991, and the title is Rawtoppm User Manual(1) β periodt. go convert some bytes and slay πΈβ¨π¦
π¦ where this page comes from
- debian bookworm: netpbm 2:11.01.00-2 Β· MIT
- debian trixie: netpbm 2:11.10.02-1 Β· MIT
- ubuntu noble: netpbm 2:11.05.02-1.1build1 Β· MIT
- ubuntu resolute: netpbm 2:11.10.02-1build1 Β· MIT
- ubuntu stonking: netpbm 2:11.13.03+ds-2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms