← 返回命令列表

Linux command

pgmtoppm 命令

文本

涉及管道、覆盖或删除,执行前请先确认路径和参数。

常用示例

Convert grayscale to color

pgmtoppm [color] [input.pgm] > [output.ppm]

Colorize with specific color

pgmtoppm [red] [input.pgm] > [output.ppm]

Map black-white to color range

pgmtoppm [black]-[blue] [input.pgm] > [output.ppm]

Use color map file

pgmtoppm -map [colormap.ppm] [input.pgm] > [output.ppm]

说明

pgmtoppm converts a PGM grayscale image to a PPM color image. It maps gray values to colors, either a single color, a color range, or via a colormap.

参数

colorspec
Color name or black-white range (e.g., "red", "black-blue").
-map _file_
Color map file.

FAQ

What is the pgmtoppm command used for?

pgmtoppm converts a PGM grayscale image to a PPM color image. It maps gray values to colors, either a single color, a color range, or via a colormap.

How do I run a basic pgmtoppm example?

Run `pgmtoppm [color] [input.pgm] > [output.ppm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does colorspec do in pgmtoppm?

Color name or black-white range (e.g., "red", "black-blue").