# phpman > man > pnmarith(1)

> **TLDR:** This command has been superseded by `pamarith`.
>
- View documentation for the current command:
  `tldr pamarith`

*Source: tldr-pages*

---

[pnmarith(1)](https://www.chedong.com/phpMan.php/man/pnmarith/1/markdown)                            General Commands Manual                           [pnmarith(1)](https://www.chedong.com/phpMan.php/man/pnmarith/1/markdown)



## NAME
       pnmarith - perform arithmetic on two portable anymaps

## SYNOPSIS
       **pnmarith** **-add**|**-subtract**|**-multiply**|**-difference**|**-minimum**|**-maximum.**  _pnmfile1_ _pnmfile2_

## DESCRIPTION
       Reads  two  portable anymaps as input.  Performs the specified arithmetic operation, and pro‐
       duces 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_  _pnm__‐
       _file2,_ i.e. no truncation is done.

       All flags can be abbreviated to their shortest unique prefix.

## SEE ALSO
       [pbmmask(1)](https://www.chedong.com/phpMan.php/man/pbmmask/1/markdown), [pnmpaste(1)](https://www.chedong.com/phpMan.php/man/pnmpaste/1/markdown), [pnminvert(1)](https://www.chedong.com/phpMan.php/man/pnminvert/1/markdown), [pnm(5)](https://www.chedong.com/phpMan.php/man/pnm/5/markdown)

## AUTHOR
       Copyright  (C)  1989,  1991  by  Jef  Poskanzer.   Lightly modified by Marcel Wijkstra <wijk‐
       <stra@fwi.uva.nl>>



                                           26 August 1993                                [pnmarith(1)](https://www.chedong.com/phpMan.php/man/pnmarith/1/markdown)
