Error Diffusion
Error diffusion dithering works by quantizing each pixel and spreading the quantization error to neighboring unprocessed pixels. Floyd-Steinberg uses specific weights to distribute this error in a serpentine scan pattern.
Cart is empty
Browse the shop to add prints
Apply Floyd-Steinberg, Bayer, and other dithering techniques
error = oldPixel − newPixel; neighbors += error · weightError diffusion dithering works by quantizing each pixel and spreading the quantization error to neighboring unprocessed pixels. Floyd-Steinberg uses specific weights to distribute this error in a serpentine scan pattern.
Bayer dithering uses a threshold matrix to decide when to round up or down. The regular pattern creates a distinct cross-hatch texture that evokes screen printing and newspaper halftones.
// 4×4 Bayer threshold matrix
const bayer4 = [
[ 0, 8, 2, 10],
[12, 4, 14, 6],
[ 3, 11, 1, 9],
[15, 7, 13, 5]
]; // Normalized to 0..1 by dividing by 16