

Jarvis, Judice, and Ninke (JJN) Dithering
Jarvis, Judice and Ninke (JJN) is an error-diffusion algorithm that spreads each pixel’s error over 12 neighbors across three rows. J. F. Jarvis, C. N. Judice and W. H. Ninke of Bell Labs described it in 1976, the same year as Floyd–Steinberg, in a survey of ways to show continuous-tone pictures on two-level displays. The wider spread gives smoother gradients and fewer artifacts, at the cost of speed.
- Author
- J.F. Jarvis, C.N. Judice & W.H. Ninke
- Year
- 1976
- Complexity
- medium
How Jarvis–Judice–Ninke dithering works
Pixels are processed one at a time and rounded to the nearest available color. The error is split into 48ths: 7 and 5 go to the next two pixels on the same row, and the two rows below receive weights that fall off with distance, 3, 5, 7, 5, 3 and then 1, 3, 5, 3, 1.
Because each pixel’s error is shared by three times as many neighbors as in Floyd–Steinberg, no single neighbor gets a large push, and the dots settle into a more even, less structured texture. The price is three times as many updates per pixel, and fine edges come out slightly softer.
| Current pixel | 7/48 | 5/48 | ||
| 3/48 | 5/48 | 7/48 | 5/48 | 3/48 |
| 1/48 | 3/48 | 5/48 | 3/48 | 1/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.
for each row y, top to bottom:
# odd rows go right to left, mirroring dx
for each x in the row:
old = pixel[x][y]
new = nearest_color(old)
pixel[x][y] = new
error = old - new
pixel[x+1][y ] += error * 7/48
pixel[x+2][y ] += error * 5/48
pixel[x-2][y+1] += error * 3/48
pixel[x-1][y+1] += error * 5/48
pixel[x ][y+1] += error * 7/48
pixel[x+1][y+1] += error * 5/48
pixel[x+2][y+1] += error * 3/48
pixel[x-2][y+2] += error * 1/48
pixel[x-1][y+2] += error * 3/48
pixel[x ][y+2] += error * 5/48
pixel[x+1][y+2] += error * 3/48
pixel[x+2][y+2] += error * 1/48When to use it (and when not to)
- Best for: photos with large smooth gradients, like skies and skin, where Floyd–Steinberg shows worms.
- Works well with: 1-bit and grayscale output, and palettes with only a few colors.
- Watch out for: slower renders on large images, and edges a touch softer than with Floyd–Steinberg or Stucki.
- In animation: Like every error diffusion, it flickers: a small change in one frame moves every later dot. For GIFs, Bayer 8×8 or Blue Noise keep their dots in place.
Jarvis–Judice–Ninke vs other algorithms
The same terminal in 1-bit, center crop at actual size.

Jarvis–Judice–Ninke 
Floyd–Steinberg 
Stucki 
Sierra
| Algorithm | Method | Animation | Look |
|---|---|---|---|
| Jarvis–Judice–Ninke | Error to 12 neighbors (100% carried) | Flickers | Smooth, even, slightly soft |
| Floyd–Steinberg | Error to 4 neighbors (100% carried) | Flickers | Sharper, more worms, faster |
| Stucki | Error to 12 neighbors (100% carried) | Flickers | Same footprint, a little crisper |
| Sierra | Error to 10 neighbors (100% carried) | Flickers | Close to JJN, less work |
Try Jarvis–Judice–Ninke on your image
Open the editor with Jarvis–Judice–Ninke already selected, drop in a photo or an animated GIF, adjust how much error travels with the Error diffusion slider, pick a palette and export the result. Free, no account, no watermark, and your image never leaves your device.
Open Jarvis–Judice–Ninke in the editorJarvis–Judice–Ninke FAQ
Is JJN dithering slow?
It updates 12 neighbors per pixel instead of 4, so it does about three times the work of Floyd–Steinberg. PixelSynth runs it in a background worker, so large images take a moment longer but the page stays responsive.
Why is it called JJN?
After its authors, J. F. Jarvis, C. N. Judice and W. H. Ninke, who published it in 1976. It’s also known as minimized average error dithering.