[][src]Module dither::ditherer

Logic for dithering a loaded, preprocessed Img. See tanner helland's excellent writeup on dithering algorithms for details.

Structs

Ditherer

A type of Dither. See the documentation for the constants (i.e, ATKINSON) for the dither matrices themselves. A ditherer carries error from quantiation to nearby pixels after dividing by div and multiplying by the given scalar in offset; "spreading" the error, eg, take floyd-steinberg dithering: div=16

ErrorUnknownDitherer

An unknown ditherer name during parsing.

Constants

ATKINSON

Atkinson dithering. Div=8.

BURKES

Burkes dithering. Div=32.

FLOYD_STEINBERG

floyd-steinberg dithering. div=16

JARVIS_JUDICE_NINKE

jarvis-judice-ninke dithering`. div=48.

SIERRA_3

sierra 3 dithering. div=32

STUCKI

Stucki dithering. div=42

Traits

Dither

dither a 2d matrix. P is the type of pixel; in practice, it is either f64 or [RGB<f64>][RGB]