Dithr: buffer-first halftoning and dithering
โ Rust ๐ 2026-04-08 ๐ค surdeus ๐๏ธ 6Hi all,
I've been working on Dithr, a buffer-first dithering and halftoning library. Dithr is designed around typed mutable slices rather than heavyweight image containers. It implements 35 different halftoning/dithering methods which range from practical methods to some more niche halftoning techniques.
Before (left) and after (right) using
yliluoma_2_in_place.
Features:
- Buffer-first API over explicit width / height / stride image data.
- Typed Gray / RGB / RGBA support for
u8,u16, andf32. - Bayer, Floyd-Steinberg, Stucki, Sierra, Atkinson, Yliluoma 1/2/3, Ostromoukhov, Zhou-Fang, Riemersma, Knuth dot diffusion, direct binary search, lattice-Boltzmann, electrostatic halftoning, and more.
- Palette-constrained and indexed workflows via
Palette<S>andIndexedImage<S>. - Optional
rayonparallel wrappers for selected stochastic, Yliluoma and ordered families. - Optional
imageadapters forDynamicImage-based pipelines.
github: GitHub - pbkx/dithr: Buffer-first rust dithering and halftoning library. ยท GitHub
crates: crates.io: Rust Package Registry
1 post - 1 participant
๐ท๏ธ Rust_feed

