photocraft/crates/engine
Brandon Thomas 685aca7769 feat(compose): Lab documents evaluate Invert, Posterize, Threshold, Brightness/Contrast and Gradient Map on L, a, b
In Lab documents Photoshop evaluates these adjustments on the Lab channels,
not on the screen RGB colour:

- Invert and Posterize act on L, a and b alike (normalised L/100,
  (a+128)/255, (b+128)/255; Invert is n -> 1 - n).
- Brightness/Contrast (modern and legacy) applies its tone curve to L only;
  a and b are unchanged.
- Threshold splits on L alone and outputs neutral black or white.
- Gradient Map is driven by L (Reverse uses 1 - L).

Adjustment layers (CPU compositor) and destructive Image > Adjustments both
go through the new `adjust::apply_in`; the GPU compositor defers these
adjustments to the CPU in Lab documents. Levels and Curves keep their Lab
records; other adjustments stay on the screen colour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 05:02:05 -04:00
..
examples Content-Aware tools: faster, cancellable at once, same pixels (P21, P22, P49) (#3395) 2026-10-12 00:11:10 -04:00
src feat(compose): Lab documents evaluate Invert, Posterize, Threshold, Brightness/Contrast and Gradient Map on L, a, b 2026-10-12 05:02:05 -04:00
tests Commands check an explicit "layer" instead of whichever layer is active (#3466) 2026-10-11 23:17:45 -04:00
Cargo.toml Security: harden document exports and automation inputs (#2269) 2026-10-11 23:18:52 -06:00