LinuxCommandLibrary

ppmdither

Reduce colors with dithering patterns

TLDR

Dither image

$ ppmdither [input.ppm] > [output.ppm]
copy
Specify colors per channel
$ ppmdither -red [4] -green [4] -blue [4] [input.ppm] > [output.ppm]
copy
Floyd-Steinberg dithering
$ ppmdither -fs [input.ppm] > [output.ppm]
copy

SYNOPSIS

ppmdither [options] [file]

DESCRIPTION

ppmdither reduces the number of colors in a PPM image using dithering, which simulates unavailable colors by arranging available colors in patterns that appear blended at a distance. The number of levels per color channel can be specified independently for red, green, and blue.
The default uses ordered dithering, while the -fs option selects Floyd-Steinberg error diffusion dithering which generally produces higher quality results with less visible patterning. Unlike quantization (ppmquant), dithering does not choose optimal colors but distributes error across neighboring pixels. Part of the Netpbm toolkit.

PARAMETERS

FILE

Input PPM file.
-red N
Red channel levels.
-green N
Green channel levels.
-blue N
Blue channel levels.
-fs
Floyd-Steinberg dithering.

CAVEATS

Different from quantization. Part of Netpbm suite.

HISTORY

ppmdither was created as part of Netpbm for color dithering.

SEE ALSO

ppmquant(1), pnmremap(1), ppm(5)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community