Linux command
pnminvert 命令
文本
涉及管道、覆盖或删除,执行前请先确认路径和参数。
常用示例
Invert image colors
pnminvert [input.pnm] > [output.pnm]
Invert from stdin
cat [image.pnm] | pnminvert > [output.pnm]
说明
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). If no file is given, input is read from stdin. Output is always written to stdout. Part of the Netpbm toolkit. The more general paminvert supersedes this tool and handles PAM images as well.
FAQ
What is the pnminvert command used for?
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). If no file is given, input is read from stdin. Output is always written to stdout. Part of the Netpbm toolkit. The more general paminvert supersedes this tool and handles PAM images as well.
How do I run a basic pnminvert example?
Run `pnminvert [input.pnm] > [output.pnm]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more pnminvert examples?
This page includes 2 examples for pnminvert, plus related commands for nearby Linux tasks.