1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/pnmcolormap.md
Juri Dispan 13dc362fa8
pamflip, pnmcolormap, pnmquant, pnmremap, pnmrotate, ppmquant: add pages (#11800)
* pamflip, pnmcolormap, pnmquant, pnmremap, pnmrotate, ppmquant: add pages

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-12-21 11:33:10 +05:30

675 B

pnmcolormap

Create quantization color map for a PNM image. More information: https://netpbm.sourceforge.net/doc/pnmcolormap.html.

  • Generate an image using only n_colors or less colors as close as possible to the input image:

pnmcolormap {{n_colors}} {{path/to/input.pnm}} > {{path/to/output.ppm}}

  • Use the splitspread strategy for determining the output colors, possibly producing a better result for images with small details:

pnmcolormap -splitspread {{n_colors}} {{path/to/input.pnm}} > {{path/to/output.ppm}}

  • Sort the resulting colormap, which is useful for comparing colormaps:

pnmcolormap -sort {{path/to/input.pnm}} > {{path/to/output.ppm}}