Files
photocraft/crates/compose
Brandon ThomasandClaude Opus 4.8 b6b8ed21cb Levels: Photoshop's gamma>1 shadow toe (bounded slope 2^gamma)
Verified our levels() against Adobe Photoshop 2026 (adjustLevels on a 0..255
ramp): exact for gamma<=1 and all input/output ranges, but a pure u^(1/gamma)
has infinite slope at black while Photoshop bounds the shadow toe to initial
slope 2^gamma. Added a soft-min (p-norm) of the power curve with that line,
applied only for gamma>1; reduces to the exact power curve in the body, so
highlights/midtones and gamma<=1 are unchanged. GPU Levels LUT is built from
this fn, so GPU stays in sync (gpu parity 18/18).

Corpus oracle: levels_grayscale.psd max error 0.043 -> 0.0078 (bad px
4.1% -> 0.1%); 113 pass / 30 differ unchanged (no regressions). Golden test
pins the curve to captured Photoshop samples (gamma 2 toe within 4/255).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-10-03 09:58:31 -04:00
..
2026-10-01 08:25:06 -04:00
2026-09-30 09:37:18 -04:00
2026-10-01 09:16:17 -04:00
2026-09-30 09:37:18 -04:00