← 返回命令列表

Linux command

ppmchange 命令

文本

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

常用示例

Change specific color

ppmchange [oldcolor] [newcolor] [input.ppm] > [output.ppm]

Change red to blue

ppmchange red blue [input.ppm] > [output.ppm]

Change multiple colors

ppmchange [old1] [new1] [old2] [new2] [input.ppm] > [output.ppm]

说明

ppmchange replaces specific colors in PPM images with new colors. Multiple color substitutions can be specified in a single invocation by providing pairs of old and new colors on the command line. By default, only exact color matches are replaced. The -closeness option allows fuzzy matching by specifying a tolerance value, useful when working with images that have slight color variations due to compression or anti-aliasing. Part of the Netpbm toolkit.

参数

-closeness _N_
Color matching tolerance.

FAQ

What is the ppmchange command used for?

ppmchange replaces specific colors in PPM images with new colors. Multiple color substitutions can be specified in a single invocation by providing pairs of old and new colors on the command line. By default, only exact color matches are replaced. The -closeness option allows fuzzy matching by specifying a tolerance value, useful when working with images that have slight color variations due to compression or anti-aliasing. Part of the Netpbm toolkit.

How do I run a basic ppmchange example?

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

What does -closeness _N_ do in ppmchange?

Color matching tolerance.