experiment(render): Riemersma dither to stop sky→face blue bleed
CI / test (push) Has been cancelled

Floyd-Steinberg's row-order error diffusion was flushing residual blue
debt from sky pixels downward into the face below — visible as a blue
hue in skin tones that should have been YELLOW/RED/WHITE in the 6-color
palette. Riemersma uses a Hilbert-curve scan, so error stays local and
isn't biased along any axis.

DITHER_METHOD  FLOYDSTEINBERG → RIEMERSMA  (gamma 1.2 + saturation 115
from experiment #1 unchanged).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-14 13:29:46 -04:00
parent 1ebc9b615d
commit f3bf49ba1d
@@ -46,8 +46,14 @@ final class RenderImageMessageHandler
/** sharpenImage(radius=0, SHARPEN_SIGMA). Baseline: 0.8 (light). */
private const SHARPEN_SIGMA = 0.8;
/** Imagick dither method. Baseline: DITHERMETHOD_FLOYDSTEINBERG. */
private const DITHER_METHOD = \Imagick::DITHERMETHOD_FLOYDSTEINBERG;
/** Imagick dither method.
* Baseline: DITHERMETHOD_FLOYDSTEINBERG — error diffuses down-right
* in row order, so a blue sky's residual error
* accumulates downward and "flushes" into faces/hair
* below, contaminating skin tones with blue.
* Experiment #2: DITHERMETHOD_RIEMERSMA — Hilbert-curve scan, error
* stays local and doesn't bias along any axis. */
private const DITHER_METHOD = \Imagick::DITHERMETHOD_RIEMERSMA;
public function __construct(
private readonly ImageRepository $imageRepo,