Back to directory

dithr

A Rust image-dithering and halftoning library that works directly on typed pixel buffers, offering ordered, diffusion, stochastic and palette-based methods to avoid banding when reducing color depth.

dithr

dithr provides dithering and halftoning algorithms for reducing the color or grayscale depth of an image buffer without introducing visible banding or contouring. It operates directly on mutable pixel slices with explicit width, height and stride, across 8, 16 and 32-bit-float sample types in grayscale, RGB and RGBA layouts, so it can be dropped into an existing image pipeline without an intermediate copy.

A shared QuantizeMode type configures the target grayscale levels, RGB levels, a fixed palette or a single-color workflow across the library's ordered, diffusion, variable-diffusion, stochastic, palette-oriented and other halftoning algorithm families, and a Palette and IndexedImage type support constrained, indexed output. Optional feature flags add adapters for the image crate's DynamicImage type and parallel processing through rayon for selected algorithm families. It installs as a Cargo dependency.

More in Libraries

See all 292
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • TradeCanvas

    bonguynvan.github.io

    A zero-dependency canvas charting engine for building TradingView-style trading charts in JavaScript, with 66 technical indicators, 24 drawing tools, 17 chart types, and real-time streaming.

  • 3d retro graphics

    3d-retro.com

    A free, CC0-licensed library of copy-paste retro 3D and demoscene graphics effects, such as plasma, raytracing, and voxel terrain, runnable as WebGL 1 or plain 2D canvas.