The gamma error in dominant-color extraction

Resizing an image to 1×1 px with Imagick/GD (default pipeline) averages gamma-encoded sRGB values. The physically correct average — what you see squinting at the photo from across the room — averages in linear light, then re-encodes. Gamma-space averaging skews placeholder colors darker and duller; the gap grows with image contrast. Reference: Eric Brasseur, “Gamma error in picture scaling”. Demo by , part of img2gradient.

gamma avg: mean(srgb) ← Imagick/GD default, e.g. -resize 1x1 linear avg: srgb_encode( mean(srgb_decode) ) ← -colorspace RGB -resize 1x1 -colorspace sRGB
Loading sample images…
Drop your own image here (or click) — computed locally, nothing uploads