Linux Commands Examples

A great documentation place for Linux commands

pnmarith

perform arithmetic on two portable anymaps


see also : pbmmask - pnmpaste - pnminvert

Synopsis

pnmarith -add|-subtract|-multiply|-difference|-minimum|-maximum. pnmfile1 pnmfile2


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples


no example yet ...

... Feel free to add your own example above to help other Linux-lovers !

description

Reads two portable anymaps as input. Performs the specified arithmetic operation, and produces a portable anymap as output. The two input anymaps must be the same width and height.

The arithmetic is performed between corresponding pixels in the two anymaps, as if maxval was 1.0, black was 0.0, and a linear scale in between. Results that fall outside of [0..1) are truncated.

The operator -difference calculates the absolute value of pnmarith -subtract pnmfile1 pnmfile2, i.e. no truncation is done.

All flags can be abbreviated to their shortest unique prefix.


see also

pbmmask , pnmpaste , pnminvert , pnm


author

Copyright (C) 1989, 1991 by Jef Poskanzer. Lightly modified by Marcel Wijkstra <wijkstra[:at:]fwi.uva[:dot:]nl>

How can this site be more helpful to YOU ?


give  feedback