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 07:03:10 +01:00
|
|
|
# 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:
|
|
|
|
|
2025-04-01 06:42:14 +03:00
|
|
|
`pnmcolormap {{[-splits|-splitspread]}} {{n_colors}} {{path/to/input.pnm}} > {{path/to/output.ppm}}`
|
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 07:03:10 +01:00
|
|
|
|
|
|
|
- Sort the resulting colormap, which is useful for comparing colormaps:
|
|
|
|
|
2025-04-01 06:42:14 +03:00
|
|
|
`pnmcolormap {{[-so|-sort]}} {{path/to/input.pnm}} > {{path/to/output.ppm}}`
|