Skip to content
Sphere dithered with Jarvis, Judice, and Ninke (JJN)The same sphere before ditheringSourceDithered

02Error diffusion

Jarvis, Judice, and Ninke (JJN)

Spreads the error over 12 pixels, creating smoother and more natural textures, though at a slower speed.

Author
J.F. Jarvis, C.N. Judice & W.H. Ninke
Year
1976
Complexity
high
Processing cost
4 / 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 48, by position relative to the current pixel
Current pixel7/485/48
3/485/487/485/483/48
1/483/485/483/481/48
  • The error of the current pixel is spread over 12 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.