LinuxCommandLibrary

rawtoppm

Convert raw RGB data to PPM format

TLDR

Convert raw RGB to PPM

$ rawtoppm [width] [height] [input.raw] > [output.ppm]
copy
Convert with interleaved format
$ rawtoppm -interrow [width] [height] [input.raw] > [output.ppm]
copy

SYNOPSIS

rawtoppm [options] width height [file]

DESCRIPTION

rawtoppm converts raw RGB color data into Portable Pixmap (PPM) format by interpreting a byte stream as red, green, and blue pixel values arranged according to specified image dimensions. The tool handles different memory layouts for the color channels: the default expects pixel-interleaved data (RGBRGB...), while -interrow reads row-interleaved data where each color plane is stored as a complete row before the next.
Since raw data contains no metadata, both width and height must be specified as arguments. The -headerskip option skips non-image data at the beginning of the file. It is part of the Netpbm image processing toolkit.

PARAMETERS

width

Image width in pixels.
height
Image height in pixels.
-headerskip bytes
Skip header bytes.
-interrow
Row-interleaved RGB.
-interpixel
Pixel-interleaved RGB.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community