Transform full‑color or grayscale images into striking bitmap art using professional dithering algorithms. Simulate retro aesthetics, reduce color depth, and explore the science of digital halftoning — fully client‑side, privacy first.
Dithering is a technique used in digital image processing to simulate shades of gray or additional colors when the available palette is limited. By strategically placing black and white pixels (or colors from a restricted set), the human eye blends them into intermediate tones. This principle, rooted in halftoning, was essential for early computer graphics, fax machines, and retro gaming consoles. Modern dithering remains relevant for pixel art, e‑ink displays, print preparation, and aesthetic "lo‑fi" visuals.
? The core principle: Error diffusion vs. Ordered dither
Error diffusion (Floyd‑Steinberg, Atkinson) spreads the quantization error to neighboring pixels, preserving local brightness. Ordered dithering uses a fixed threshold matrix (Bayer) to create a patterned texture. Both methods convert continuous tone into binary, each with unique visual signatures.
Developed by Robert W. Floyd and Louis Steinberg in 1976, this algorithm remains one of the most widely used dithering techniques. It scans the image left‑to‑right, top‑to‑bottom, and for each pixel distributes the quantization error (difference between original and new value) to four neighboring pixels: right (7/16), bottom‑left (3/16), bottom (5/16), and bottom‑right (1/16). This yields high‑quality, artifact‑resistant results ideal for photographs.
Bayer dithering applies a threshold map (e.g., 4x4 or 8x8 matrix) that repeats across the image. Each pixel's luminance is compared with the corresponding matrix value, producing a regular, screen‑like pattern. It is computationally efficient and creates a nostalgic dot‑matrix effect often seen in retro game graphics, early desktop publishing, and newspaper halftones.
Created by Bill Atkinson for the Apple Macintosh (1980s), this variant spreads error to six neighboring pixels with a factor of 1/8 each, discarding the remaining 2/8 of error. It produces a lighter, highly textured output that became iconic for early Mac graphics and pixel‑art shading. Our implementation respects the classic distribution: right, down, down‑right, and three additional adjacent pixels.
| Algorithm | Style | Speed | Best for | Typical artifacts |
|---|---|---|---|---|
| Floyd‑Steinberg | Error diffusion | Medium | Photorealistic 1‑bit, smooth gradients | "worm" artifacts in uniform areas |
| Atkinson | Error diffusion | Medium | Pixel art, retro Macintosh style | Lightening overall, high contrast |
| Bayer 8x8 | Ordered dither | Very fast | Screen effects, real‑time previews | Visible crosshatch pattern |
| Simple threshold | No dither | Fastest | Silhouette, posterization tests | Severe banding, detail loss |
Indie game developers use dithering to convert high‑resolution concept art into 1‑bit textures that fit strict memory constraints (Game Boy, Arduboy, or OLED displays). Floyd‑Steinberg preserves organic shapes while Atkinson yields a classic “comic book” feel. With our tool, artists can rapidly experiment and export assets for engines like Godot or Unity.
Mathematically, for each pixel i with grayscale value g(i), the quantized output b(i) is either 0 or 255 based on threshold T. The error e(i) = g(i) - b(i) is then propagated to unprocessed neighbors via a kernel. This minimizes the overall perceived error and preserves local luminance. The Floyd‑Steinberg kernel has proven optimal for many use cases, while variations like Sierra and Stucki offer different trade‑offs.