ppmtorgb3
Convert PPM image to RGB rasterfile
TLDR
Separate the color components of a PPM file, saving the outputs to file.red, file.grn and file.blu
SYNOPSIS
ppmtorgb3
DESCRIPTION
The ppmtorgb3 command converts a PPM (Portable Pixmap) image file to an RGB3 image file.
An RGB3 image is a raw raster format used primarily on older SGI systems, storing pixel data as three bytes per pixel (Red, Green, Blue). This command is useful for converting images into a format suitable for legacy applications or hardware that require RGB3 input. ppmtorgb3 reads a PPM file from standard input and writes the equivalent RGB3 file to standard output. It doesn't perform any image scaling or manipulation beyond format conversion.
CAVEATS
ppmtorgb3 does not accept any command-line parameters.
It operates solely by reading a PPM image from standard input and writing the converted RGB3 image to standard output. Therefore, it is commonly used in conjunction with redirection or pipes.
The output RGB3 file does not contain any header information, just raw pixel data. RGB3 file format is generally less portable than PPM and more specific to SGI systems.
USAGE EXAMPLES
To convert a PPM image named 'image.ppm' to an RGB3 image and save it as 'image.rgb3':ppmtorgb3 < image.ppm > image.rgb3
To pipe the output of another PPM generating command directly into ppmtorgb3: other_command | ppmtorgb3 > image.rgb3
SEE ALSO
ppm(5), rgb3toppm(1), pnm(5)