experiment(render): revert sat/gamma/blur to baseline; blue-channel ×0.95
CI / test (push) Has been cancelled
CI / test (push) Has been cancelled
Experiment #3 (sat 115, gamma 1.2, blur 0.6) was a net loss — greens desaturated, no help on sky→face blue bleed. Reverting those three to baseline (130, 1.0, 0.0). New experiment #4: multiply the source's blue channel by 0.95 before dither. Real sky stays well above the BLUE-vs-WHITE boundary, but borderline-bluish skin (sky cast on outdoor faces) drops below it and maps to YELLOW / WHITE / RED instead of feeding the dither's BLUE attractor. Adds public BLUE_CHANNEL_MUL constant; render-compare's baseline struct gets blue_mul=1.0 so half-A is still frozen at the original. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,7 @@ final class RenderCompareCommand extends Command
|
||||
'gamma' => 1.0,
|
||||
'sharpen' => 0.8,
|
||||
'blur' => 0.0,
|
||||
'blue_mul' => 1.0,
|
||||
'dither' => \Imagick::DITHERMETHOD_FLOYDSTEINBERG,
|
||||
];
|
||||
|
||||
@@ -94,6 +95,7 @@ final class RenderCompareCommand extends Command
|
||||
'gamma' => RenderImageMessageHandler::GAMMA,
|
||||
'sharpen' => RenderImageMessageHandler::SHARPEN_SIGMA,
|
||||
'blur' => RenderImageMessageHandler::BLUR_SIGMA,
|
||||
'blue_mul' => RenderImageMessageHandler::BLUE_CHANNEL_MUL,
|
||||
'dither' => RenderImageMessageHandler::DITHER_METHOD,
|
||||
];
|
||||
|
||||
@@ -140,8 +142,8 @@ final class RenderCompareCommand extends Command
|
||||
? 'FloydSteinberg'
|
||||
: ($p['dither'] === \Imagick::DITHERMETHOD_RIEMERSMA ? 'Riemersma' : 'No');
|
||||
return sprintf(
|
||||
'sat=%d gamma=%.2f sharpen=%.2f blur=%.2f dither=%s',
|
||||
$p['saturation'], $p['gamma'], $p['sharpen'], $p['blur'], $dither,
|
||||
'sat=%d gamma=%.2f sharpen=%.2f blur=%.2f blue_mul=%.2f dither=%s',
|
||||
$p['saturation'], $p['gamma'], $p['sharpen'], $p['blur'], $p['blue_mul'], $dither,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -164,6 +166,9 @@ final class RenderCompareCommand extends Command
|
||||
if ($params['blur'] > 0) {
|
||||
$im->blurImage(0, $params['blur']);
|
||||
}
|
||||
if ($params['blue_mul'] !== 1.0) {
|
||||
$im->evaluateImage(\Imagick::EVALUATE_MULTIPLY, $params['blue_mul'], \Imagick::CHANNEL_BLUE);
|
||||
}
|
||||
|
||||
if ($im->getImageWidth() !== self::W || $im->getImageHeight() !== self::FULL_H) {
|
||||
$canvas = new \Imagick();
|
||||
|
||||
Reference in New Issue
Block a user