// Guide / Algorithm

Floyd-Steinberg Dithering

Floyd-Steinberg dithering is the most widely used error-diffusion algorithm for reducing an image to a limited color palette — often just black and white — without losing the impression of smooth tone. Developed by Robert W. Floyd and Louis Steinberg in 1976, it's the reason old black-and-white newspaper photos, early Mac bitmap graphics, and modern pixel-art tools all share that distinctive scattered, grainy look instead of harsh color bands.

How it works

The algorithm scans an image pixel by pixel, left to right, top to bottom. For each pixel, it picks the closest available color in the output palette (say, pure black or pure white), then calculates the error — the difference between the original pixel's brightness and the color it just chose. Instead of discarding that error, Floyd-Steinberg diffuses it forward into neighboring pixels that haven't been processed yet, using a fixed set of weights:

7/16 to the pixel immediately to the right
3/16 to the pixel below-left
5/16 to the pixel directly below
1/16 to the pixel below-right

By the time the scan reaches those neighboring pixels, their brightness has already been nudged toward compensating for the rounding error of the pixels before them. The net effect: regions that should look like 50% gray end up as a fine, semi-random checkerboard of black and white pixels that reads as gray from a normal viewing distance, instead of a flat gray block or a harsh cutoff.

Why it still matters

Error diffusion beats simple threshold-based dithering (like ordered/Bayer dithering) at preserving fine detail and smooth gradients, which is why it's still the default choice for converting photographs to 1-bit images, preparing art for e-ink displays and thermal printers, and giving digital art a hand-halftoned, print-like texture. Its main tradeoff is that the resulting pattern is less uniform and repeatable than ordered dithering, which is why some retro/pixel-art styles prefer Bayer matrices instead — Dither Dog supports both, along with 26 other algorithms, so you can compare them side by side.

Try it on your own image

You don't need Photoshop or a command-line tool to apply Floyd-Steinberg dithering. Open the Dither Dog workspace, drop in a photo, video, or GIF, and select Floyd-Steinberg from the algorithm list. Everything runs client-side in your browser — your file is never uploaded anywhere — and you can pair it with any of the 23 built-in color palettes, from pure black-and-white to retro console palettes, and export the result as a PNG, WebP, GIF, or video.