eink_dither 2.0.0
eink_dither: ^2.0.0 copied to clipboard
Apply dithering algorithms to quantize full-color images for limited-color displays like E-Ink, Thermal Printers, and Dot-Matrix Screens.
2.0.0 #
- 💥 Breaking change: renamed the ordered-dither strength parameter for a consistent
naming convention across the dithering API:
EInkImageProcessor.intensity→strengthditherImageparameterbayerStrength→strength- Update call sites, e.g.
EInkImageProcessor(strength: 1.0)andditherImage(image, strength: 1.0).
- 💥 Breaking change:
ditherImageOrderednow takes aDitherKernel kernelinstead of a rawList<List<double>> matrix. The threshold matrix is resolved internally via_orderedDitherMatrix, so callers pass the kernel (e.g.ditherImageOrdered(image, quantizer, DitherKernel.bayer4x4, strength)) rather than the matrix itself.ditherImageBayerandditherImageBlueNoisecontinue to work unchanged. - ♻️ Refactored the ordered-dither branch detection in
ditherImage: added a lightweight_isOrderedDitherhelper so the branch test no longer fetches the threshold matrix; the matrix is looked up only once, insideditherImageOrdered.
1.0.1 #
- 🔗 Adjusted the image / badge links in the documentation.
1.0.0 #
- 🎛️ 8 dithering kernels — error-diffusion (Floyd–Steinberg, Stucki, Atkinson, Jarvis–Judice–Ninke, Burkes, False Floyd–Steinberg (Heckbert)), ordered (Bayer 2×2/4×4/8×8, Blue Noise), and none (no dithering).
- 🔀 4 scan orders for error-diffusion kernels (raster, serpentine, zigzag, Hilbert space-filling curve).
- 🎨 8 E-Ink palettes — from pure black/white up to 7-color (Gallery 7) and 16-level grayscale (Carta 16).
- 🧮 Universal quantizer
EInkPaletteQuantizerthat maps any color to the nearest E-Ink color in a palette using Euclidean RGB distance. - ⚙️ A configurable
EInkImageProcessorwith both synchronous (process) and isolate-based asynchronous (processIsolated) processing.