Error diffusion

Zhou–Fang dithering

Zhou and Fang (2003) build on Ostromoukhov’s three-neighbour kernel and add a threshold that varies with the grey level, which cleans up the mid-tones where Ostromoukhov still shows structure.

Good for the default when you want error diffusion.

How it decides

      #  a
   b  c         weights and threshold depend on the grey level

Blue-noise-like texture with almost no artifacts, especially in portraits where mid-tones dominate.

Zhou–Fang dithering applied to a photo of a lion
Slide to compare. A 0.7 mm cell on A5 with perceptual tone: 28,580 marks. Photo: Lion, Andreas Vonlanthen, 2025, Unsplash License.

Threshold modulation

Bingfeng Zhou and Xifeng Fang presented the method at SIGGRAPH 2003. They kept the idea behind Ostromoukhov dithering, weights that change with tone, and changed the other half of error diffusion: the threshold. Instead of rounding every pixel at 50%, the threshold is nudged by a small amount of noise whose strength depends on the grey level. That breaks up the faint patterns Ostromoukhov still leaves around the mid-tones, which is why portraits come out especially clean.

Try it live

This runs in your browser. Change the algorithm, the number of cells or the threshold, or put a second algorithm next to it.

Zhou–Fang

Rendered in 0.0 ms on your machine. Every dot here is what a pen or laser would put down.

All algorithms

Every one is an option in the Dither style: dither an image online and export a 1-bit PNG for a laser or SVG dots for a plotter.