fix(canvas): color manage Peek Negative, so the orange mask survives - #908
Merged
marcinz606 merged 1 commit intoAug 19, 2026
Merged
Conversation
Peek Negative painted the decoded source straight to the canvas as though it were already display RGB, which drained the film base: on a C-41 camera scan the mask read at R/B 1.70 against 2.30 in the file's own embedded preview. Turning Linear RAW on made it worse (1.58), not better — that swaps the camera's white balance for the unbalanced sensor signal, which is green-heavy, and neither decode is the missing piece. The buffer is in camera primaries, so apply camera_to_working_matrix in _paint_negative_peek and stop marking the frame splash, which had been suppressing the working-to-display conversion as well as the proof. The as-shot multipliers fold into the matrix when the decode skipped them, so the peek is now independent of Linear RAW: measured through the real app, both decodes land on R/B 2.25, against 2.30 for the embedded preview and 2.26 for an offline camera-matrix + working-to-sRGB reference. The proof stays off, which splash used to cover for. display_transform_params grows a `proofed` flag for that, carried in metrics as `proof` and reset alongside `splash` on every ordinary render, since last_metrics persists between frames. Sources with no camera matrix (scanner TIFF, JPEG) are already profiled and pass through unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Peek Negative painted the decoded source straight to the canvas as though it were already display RGB, which drained the film base: on a C-41 camera scan the mask read at R/B 1.70 against 2.30 in the file's own embedded preview. Turning Linear RAW on made it worse (1.58), not better — that swaps the camera's white balance for the unbalanced sensor signal, which is green-heavy, and neither decode is the missing piece.
The buffer is in camera primaries, so apply camera_to_working_matrix in _paint_negative_peek and stop marking the frame splash, which had been suppressing the working-to-display conversion as well as the proof. The as-shot multipliers fold into the matrix when the decode skipped them, so the peek is now independent of Linear RAW: measured through the real app, both decodes land on R/B 2.25, against 2.30 for the embedded preview and 2.26 for an offline camera-matrix + working-to-sRGB reference.
The proof stays off, which splash used to cover for. display_transform_params grows a
proofedflag for that, carried in metrics asproofand reset alongsidesplashon every ordinary render, since last_metrics persists between frames.Sources with no camera matrix (scanner TIFF, JPEG) are already profiled and pass through unchanged.