2023-11-04 15:17:59 +01:00
|
|
|
# ppmdither
|
|
|
|
|
|
|
|
> Reduce the number of colors in an image by applying dithering.
|
|
|
|
> More information: <https://netpbm.sourceforge.net/doc/ppmdither.html>.
|
|
|
|
|
|
|
|
- Read a PPM image, apply dithering and save it to a file:
|
|
|
|
|
|
|
|
`ppmdither {{path/to/image.ppm}} > {{path/to/file.ppm}}`
|
|
|
|
|
|
|
|
- Specify the desired number of shades for each primary color:
|
|
|
|
|
2025-04-01 06:42:14 +03:00
|
|
|
`ppmdither {{[-r|-red]}} {{2}} {{[-g|-green]}} {{3}} {{[-b|-blue]}} {{2}} {{path/to/image.ppm}} > {{path/to/file.ppm}}`
|
2023-11-04 15:17:59 +01:00
|
|
|
|
|
|
|
- Specify the dimensions of the dithering matrix:
|
|
|
|
|
2025-04-01 06:42:14 +03:00
|
|
|
`ppmdither {{[-d|-dim]}} {{2}} {{path/to/image.ppm}} > {{path/to/file.ppm}}`
|