eink_dither 2.2.2
eink_dither: ^2.2.2 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.2.2 #
- 📝 Docs: improved the documentation.
2.2.0 #
- ✨ New feature: added the Sierra family of error-diffusion kernels (Frankie Sierra):
DitherKernel.sierra3— Sierra / Sierra-3, 10 neighbours, divisor 32.DitherKernel.sierra2— Two-Row Sierra / Sierra-2, 7 neighbours, divisor 16.DitherKernel.sierraLite— Sierra Lite / Sierra-2-4A, 3 neighbours, divisor 4.
2.1.0 #
- 💥 Breaking change: renamed the ordered-dither
strengthparameter back tointensityfor a more fitting, consistent name across the dithering API:EInkImageProcessor.strength→intensityditherImage,ditherImageOrdered,ditherImageBayer,ditherImageBlueNoiseparameterstrength→intensity- Update call sites, e.g.
EInkImageProcessor(intensity: 1.0)andditherImage(image, intensity: 1.0).
- ✨ New feature: added a
patternSizeparameter ("Pattern Size") to control the scale of the dither pattern, similar to the control in many halftone editors:EInkImageProcessor.patternSizeditherImage,ditherImageOrdered,ditherImageBayer,ditherImageBlueNoiseparameterpatternSize(default1)- For ordered kernels (Bayer / blue noise) each threshold-matrix cell now covers
patternSize×patternSizepixels instead of 1×1, stretching the pattern to be coarser / larger. - For error-diffusion kernels (Floyd–Steinberg, Stucki, etc.) the diffusion now
runs on a
patternSize×patternSize-block downsampled grid and each block is expanded back, so the dither "dots" grow withpatternSize.
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.
