Like dithering, error diffusion trades something else for grey-level depth on a device with few output levels. Each pixel is rounded to the nearest available level. The rounding error, the gap between the original value and the chosen level, is spread over neighbouring pixels not yet processed. Those neighbours are nudged toward the value the current pixel could not hold, so the error cancels over a small region instead of building up.
- Pixels are processed in raster order, left to right and top to bottom.
- The error is split by a fixed kernel whose weights sum to , so total intensity is preserved.
- No sub-pixel division, so spatial resolution is preserved.
- The flat bands of false contouring become high-frequency noise, which the eye tolerates better.
Floyd-Steinberg is the common kernel. With the current pixel and the pixels already done, the error is shared as:
Serpentine scanning reverses direction every other row, so the error is not always pushed the same way and directional streaks are avoided.
Worked Example
Bi-level device with levels and . One row of 4 pixels, all at value , using 1D diffusion that passes the whole error to the next pixel.
- Pixel 1’s rounds to , error . Pixel 2 becomes .
- Pixel 2’s rounds to , error . Pixel 3 becomes .
- Pixel 3’s rounds to , error . Pixel 4 becomes .
- Pixel 4’s rounds to .
Output is , mean , matching the target that no single pixel could represent.

Left: Original greyscale. Centre: Reduced to 4 levels, showing false contouring. Right: Reduced to 4 levels with Floyd-Steinberg error diffusion, trading the flat bands for high-frequency noise. Generated from a photo by Hannes Röst, CC BY-SA 3.0.