HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pnmquant — Quantize the colors in a PNM image into a smaller set. This command is a combination of `pnmcolormap

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thecommandquantizecolorscliimagepnmquantpnm

Problem

How to use the pnmquant command: 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. See also: pnmquantall. More information: <https://netpbm.sourceforge.net/doc/pnmquant.html>.

Solution

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. See also: pnmquantall. 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}}

Code Snippets

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}}

Context

tldr-pages: common/pnmquant

Revisions (0)

No revisions yet.