Skip to content
Sphere dithered with Floyd–SteinbergThe same sphere before ditheringSourceDithered

01Error diffusion

Floyd–Steinberg

Diffuses the quantization error across 4 neighboring pixels. Produces smooth and detailed results with an excellent balance between quality and performance.

Author
Robert W. Floyd & Louis Steinberg
Year
1976
Complexity
medium
Processing cost
3 / 5

How it works

Each pixel is rounded to black or white and the rounding error is pushed onto the neighbors still to be processed. Organic and detailed.

Error diffusion weights, as a fraction of 16, by position relative to the current pixel
Current pixel7/16
3/165/161/16
  • The error of the current pixel is spread over 4 neighbors that haven’t been processed yet.
  • All of the error is carried forward.
  • Rows are scanned in alternating directions (serpentine), which avoids diagonal streaks.