Folds the parts of #995 that #999 lacked into #999:
- engine/media.rs: with a display profile, a diagnostic view keeps the
photo's histogram (taken before the overlay is drawn) and stays out of the
view cache; the clipping previews test sRGB values and are converted for
the display afterwards. Before, holding Alt on a P3 display swapped the
histogram for the clipping view's (mean luma 0.59 -> 0.999).
- Noise Reduction Luminance / Detail / Contrast show greyscale while
Alt-dragged (Overlay::for_control).
- Tests: diagnostic_views_keep_the_photos_histogram (P3 display; fails
without the media.rs change), an end-to-end headless drag that presses
and releases Alt mid-drag and checks the loupe pixels
(tests_alt_preview.rs), and every Alt-mapped id is a real control.
- Docs: NR row, What's New and ui-parity note; parity summary refreshed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Previews were always sRGB, which wide-gamut monitors show oversaturated.
Settings > Display > Choose Profile... (and the UI command
app.displayProfile) now shows photos through the monitor's ICC profile,
matrix/TRC or LUT-based.
- codecs: DisplayProfile (moxcms): the display's primaries (colorant tags,
or measured through the A2B tables of a LUT-only profile), the proxy ->
device correction (per-channel curve tables for matrix/TRC profiles, a
CMS transform for LUT profiles) and sRGB <-> display transforms.
- pipeline: DisplaySpace / RenderRequest::display: the per-pixel stage
renders into the display's primaries and gamut maps into its gamut
(CPU and GPU: only to_out / out_luma change). Soft proofing's display
gamut warning uses the display's gamut.
- engine: RenderJob::with_display; display::present converts sRGB
results (thumbnails, cached previews, embedded JPEGs). Histograms and
the preview caches stay sRGB; exports are unchanged.
- ui: the loupe, Before, Compare, hover and second window render for the
display; everything else is converted on the render workers. Settings >
Display tab, ui.json setting, file picker opening in the system's ICC
folder.
Tests: profile parsing and transforms (sRGB, P3, gamma 2.2, a synthetic
LUT-only profile, corrupted files), display renders equal 8-bit renders
into the matching output space, sampled histograms, and a headless UI test
of the whole flow. docs/display-profiles.md describes the design.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WEuxxPyG8t6KcADbZSEAUj