LinuxCommandLibrary

pnminvert

Invert colors of PNM images

TLDR

Invert image colors

$ pnminvert [input.pnm] > [output.pnm]
copy
Invert from stdin
$ cat [image.pnm] | pnminvert > [output.pnm]
copy

SYNOPSIS

pnminvert [file]

DESCRIPTION

pnminvert produces a photographic negative of a PNM image by inverting all pixel values. Each sample value is replaced with the maximum value minus the original value, effectively swapping light and dark.
The tool works with all PNM types: PBM (black/white bits are flipped), PGM (grayscale values are inverted), and PPM (each color channel is independently inverted). Part of the Netpbm toolkit; superseded by paminvert.

PARAMETERS

FILE

Input PNM file.

CAVEATS

Simple color inversion. Part of Netpbm suite.

HISTORY

pnminvert was created as part of Netpbm for image inversion operations.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community