返回命令列表

Linux command

pnmarith 命令

安全

Uses pipes, overwrite, or deletion. Check paths and options first.

命令示例

Add two images

pnmarith -add [image1.pnm] [image2.pnm] > [result.pnm]

Subtract images

pnmarith -subtract [image1.pnm] [image2.pnm] > [result.pnm]

Multiply images

pnmarith -multiply [image1.pnm] [image2.pnm] > [result.pnm]

Take minimum values

pnmarith -minimum [image1.pnm] [image2.pnm] > [result.pnm]

说明

pnmarith performs arithmetic operations on two PNM images pixel by pixel. Images must have same dimensions. Useful for compositing, masking, and image comparison. Superseded by pamarith in modern Netpbm.

参数

-add
Add pixel values.
-subtract
Subtract pixel values.
-multiply
Multiply pixel values.
-difference
Absolute difference.
-minimum
Minimum of pixels.
-maximum
Maximum of pixels.
-mean
Average of pixels.

FAQ

What is the pnmarith command used for?

pnmarith performs arithmetic operations on two PNM images pixel by pixel. Images must have same dimensions. Useful for compositing, masking, and image comparison. Superseded by pamarith in modern Netpbm.

How do I run a basic pnmarith example?

Run `pnmarith -add [image1.pnm] [image2.pnm] > [result.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -add do in pnmarith?

Add pixel values.