# man > pnminvert(1)

> **TLDR:** Invert a PNM image.
>
- Invert the colors or greyscale values in a PNM image:
  `pnminvert {{path/to/input.pnm}} > {{path/to/output.pnm}}`

*Source: tldr-pages*

---

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

## NAME
       pnminvert - invert a PNM image


## SYNOPSIS
### pnminvert

       [_pnmfile_]


## DESCRIPTION
       This program is part of [**Netpbm**(1)](https://www.chedong.com/phpMan.php/man/Netpbm/1/markdown).

       **pnminvert **reads a PNM image as input, inverts it black for white, and produces a PNM image as
       output.

       If  the  image is grayscale, **pnminvert **replaces a pixel with one of complementary brightness,
       i.e. if the original pixel has gamma-adjusted gray value G, the output pixel has  gray  value
       maxval - G.

       If  the  image  is  color,  **pnminvert **inverts each individual RGB component the same as for a
       grayscale image.


## OPTIONS
       There are no command line options defined specifically for **pnminvert**, but it  recognizes  the
       options common to all programs based on libnetpbm (See ]8;;index.html#commonoptions\ Common Options]8;;\ .)


## SEE ALSO
       [**pnm**(1)](https://www.chedong.com/phpMan.php/man/pnm/1/markdown)


## AUTHOR
       Copyright (C) 1989 by Jef Poskanzer.

## DOCUMENT SOURCE
       This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master
       documentation is at

              **<http://netpbm.sourceforge.net/doc/pnminvert.html>**

netpbm documentation                       08 August 1989                   _Pnminvert_ _User_ [_Manual_(1)](https://www.chedong.com/phpMan.php/man/Manual/1/markdown)
