Skip to content

fix(exposure): stop double-correcting primaries on Slide with an Input ICC - #994

Merged
marcinz606 merged 2 commits into
marcinz606:mainfrom
thetalkingdrum:fix/e6-input-icc-camera-matrix-991
Aug 29, 2026
Merged

fix(exposure): stop double-correcting primaries on Slide with an Input ICC#994
marcinz606 merged 2 commits into
marcinz606:mainfrom
thetalkingdrum:fix/e6-input-icc-camera-matrix-991

Conversation

@thetalkingdrum

Copy link
Copy Markdown
Contributor

Summary

Fixes #991. On Slide/E-6 with Normalize off and a custom Input ICC set,
primaries were corrected twice: the render always applies the raw's
own embedded camera matrix on this path, and Soft Proof / export then
applied the Input ICC's own matrix on top of that — producing the
wrong color cast reported in #991, in both the preview and (worse)
every export, regardless of whether Soft Proof was ever toggled on.

An active Input ICC now stands in for the camera's own primaries
matrix instead of stacking with it, matching how negatives already
behave (no built-in matrix there — Input ICC is the only correction)
and the existing precedent for narrowband's bundled profile, which is
suppressed on a slide the same way: an explicit Input ICC is a
deliberate choice about the user's own source and wins.

The one subtlety: the transfer-path decode always skips the as-shot
white balance and relies on camera_to_working_matrix's camera_wb
fold to reconstruct it, so simply nulling the camera matrix outright
also silently dropped that fold, leaving a raw, unbalanced buffer for
the ICC's matrix to (mis)correct. wb_only_cam_xyz stands cam_xyz
in with a value that keeps the fold but collapses the camera's own
primaries rotation to identity, since the ICC supplies its own.

Credit to @radioproektor for the original report and for the
"Normalize fixes it" observation, which was the actual diagnostic key
(turning Normalize on stops the camera matrix from applying at all, so
only the Input ICC correction runs, once).

Test plan

…t ICC

E6/Slide with Normalize off already applies the raw's embedded camera
matrix; Soft Proof and export then applied a custom Input ICC's matrix
on top of that, correcting primaries twice. An active Input ICC now
replaces the embedded matrix instead of stacking with it, matching how
negatives already behave and how narrowband's bundled profile is
suppressed the same way.

Fixes marcinz606#991
…amera matrix

The transfer-path decode always skips as-shot white balance and relies
on camera_to_working_matrix's camera_wb fold to reconstruct it. Nulling
cam_xyz outright for an active Input ICC dropped that fold too, so the
buffer reaching the ICC's primaries-only matrix was still raw and
unbalanced, rendering green. wb_only_cam_xyz stands cam_xyz in with a
value that keeps the fold but degenerates the camera's own primaries
rotation to identity, since the ICC supplies its own.
@marcinz606
marcinz606 merged commit c274a31 into marcinz606:main Aug 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: When Soft Proof enabled, Slide preview in NegPy has wrong colors and don't match to ICC profile.

2 participants