mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 01:18:43 +00:00
The field documents "1 = neutral; lower = more contrast", but the tone map used gamma directly as the powf exponent, so 0.5 lightened midtones and 2.0 darkened them - the slider ran opposite to its own contract. The crate's other two gamma controls (hdr.rs, proof_sim.rs) already use the reciprocal exponent. Apply 1.0 / gamma like they do. Neutral (1.0) is unchanged; every other value now moves midtones the documented way. Adds a regression test on a flat 50% grey: gamma 0.5 darkens the midtone, gamma 2.0 lightens it (reversed on main: 0.71 / 0.25). Co-authored-by: Brandon Fenty <bfenty@users.noreply.github.com>