rawtopgm
Convert raw grayscale data to PGM format
TLDR
Convert raw grayscale to PGM
$ rawtopgm [width] [height] [input.raw] > [output.pgm]
Convert with header bytes to skip$ rawtopgm -headerskip [512] [width] [height] [input.raw] > [output.pgm]
SYNOPSIS
rawtopgm [options] width height [file]
DESCRIPTION
rawtopgm converts raw grayscale byte data into Portable Graymap (PGM) format by interpreting a stream of pixel values according to specified image dimensions. Since raw data contains no metadata, the width and height must be provided as arguments so the tool knows how to arrange the bytes into a proper image grid.
The -headerskip option allows skipping file headers that precede the actual pixel data, and -bpp handles 16-bit samples for higher dynamic range images. 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.-maxval n
Maximum gray value.-bpp n
Bytes per pixel (1 or 2).
