pnmquant
Quantize the colors in a PNM image into a smaller set. This command is a combination of pnmcolormap and pnmremap and accepts the union of their options, except -mapfile. More information: <https://netpbm.sourceforge.net/doc/pnmquant.html>.
Install
- All systems
-
curl cmd.cat/pnmquant.sh
- Debian
-
apt-get install netpbm
- Ubuntu
-
apt-get install netpbm
- Arch Linux
-
pacman -S netpbm
- Kali Linux
-
apt-get install netpbm
- CentOS
-
yum install netpbm-progs
- Fedora
-
dnf install netpbm-progs
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install netpbm
- OS X
-
brew install netpbm
- Raspbian
-
apt-get install netpbm
- Dockerfile
- dockerfile.run/pnmquant
Quantize the colors in a PNM image into a smaller set. This command is a combination of pnmcolormap and pnmremap and accepts the union of their options, except -mapfile. More information: <https://netpbm.sourceforge.net/doc/pnmquant.html>.
-
Generate an image using only `n_colors` or less colors as close as possible to the input image:
pnmquant n_colors path/to/input.pnm > path/to/output.pnm
© tl;dr; authors and contributors