Crate dither

Source
Expand description

§Dither

§Written by Efron Licht. Available under the MIT license. Hire me!

Inspired by: http://www.tannerhelland.com/4660/dithering-eleven-algorithms-source-code/ and the game “Return of the Obra Dinn”

Modules§

color
handling of color modes & RGB.
ditherer
Logic for dithering a loaded, preprocessed Img. See tanner helland’s excellent writeup on dithering algorithms for details.
prelude
Re-exports of the most common traits and types.

Enums§

Error
Handling of runtime errors in main.

Functions§

clamp_f64_to_u8
clamp a f64 to the closest u8, rounding non-integers.
create_quantize_n_bits_func
quantize to n bits. See the bit_depth option.

Type Aliases§

Result
Result type for Error