Linux command
rawtoppm 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Convert raw RGB to PPM
rawtoppm [width] [height] [input.raw] > [output.ppm]
Convert with interleaved format
rawtoppm -interrow [width] [height] [input.raw] > [output.ppm]
说明
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.
参数
- -headerskip _bytes_
- Skip header bytes.
- -interrow
- Row-interleaved RGB.
- -interpixel
- Pixel-interleaved RGB.
FAQ
What is the rawtoppm command used for?
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.
How do I run a basic rawtoppm example?
Run `rawtoppm [width] [height] [input.raw] > [output.ppm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -headerskip _bytes_ do in rawtoppm?
Skip header bytes.