Film negative conversion: non-destructive & in-library (replaces the modal/TIFF flow)#1349
Open
SandeepSubba wants to merge 3 commits into
Open
Film negative conversion: non-destructive & in-library (replaces the modal/TIFF flow)#1349SandeepSubba wants to merge 3 commits into
SandeepSubba wants to merge 3 commits into
Conversation
Owner
|
Great PR! My notes from a quick testing:
Thanks a lot, looks good otherwise :) |
…/TIFF flow)
Reworks the Film Negative Converter from a modal that bakes a separate
_Positive.tiff into a non-destructive, in-library conversion that fits the
sidecar model.
- Right-click 'Convert Negative' inverts a negative to a neutral positive in
place (density inversion + per-channel auto-bounds), stored in the raw's
.rrdata sidecar as negativeConversion { enabled, bounds } and applied on load
(single decode chokepoint, load_base_image_from_bytes), so the editor,
thumbnails and export all render the positive. The original raw is untouched.
- All further tuning (exposure, white balance, contrast, curves, masks) happens
in the normal Develop module on top. 'Revert to Negative' removes it; the
editor + library/filmstrip menus toggle Convert/Revert based on state.
- Backend: replaces preview_negative_conversion/convert_negatives with a single
set_negative_conversion(paths, enabled). Adjustment saves preserve the
backend-owned negativeConversion block; thumbnails regenerate on convert/revert.
- Removes the Convert Negative modal.
Inversion math unchanged (NegPy-derived, GPL-3.0).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Batch revert was a no-op: the context-menu toggle keys off each item's is_negative flag, which only refreshed via the async folder re-list, so a freshly-converted batch still read is_negative=false and the toggle kept re-converting instead of reverting. Update the affected list items optimistically right after the command so Convert/Revert flips immediately. - Trim the verbose doc/inline comments across the negative-conversion files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SandeepSubba
force-pushed
the
upstream-negative-conversion
branch
from
July 8, 2026 13:58
4ac81df to
8952181
Compare
These two files are left unformatted on upstream/main (from the CyberTimon#1339 Android LUT fix) and fail `cargo fmt --check` in CI; `cargo fmt` collapses three multi-line calls that fit on one line. Not part of the negative-conversion feature — included only so this PR's lint job passes. main needs the same fix independently. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Reworks the Film Negative Converter from a modal that bakes a separate
_Positive.tiffinto a non-destructive, in-library conversion that fits RapidRAW's sidecar model.You right-click a negative → Convert Negative. It inverts to a neutral positive in place (no new file, no duplicate library entry), and you do all the tuning — exposure, white balance, contrast, curves, masks — in the normal Develop module on top. Right-click → Revert to Negative turns it back off.
Why
The old flow was self-contained because it was destructive: once you exported the TIFF there was no going back, so the modal carried its own exposure / contrast / white-balance sliders. Those duplicate what Develop already does. The only genuinely negative-specific step is the density inversion + per-channel auto-bounds — everything else belongs in Develop. Making it non-destructive removes the duplication and the duplicate files, and makes the conversion re-tunable and reversible.
What changed
Behaviour
.rrdatasidecar asnegativeConversion: { enabled, bounds }and applied on load, so the editor, thumbnails and export all render the positive. The original raw is never touched.Backend
preview_negative_conversion/convert_negativeswith a singleset_negative_conversion(paths, enabled).maybe_apply_negativeinverts a flagged negative at the single decode chokepoint (load_base_image_from_bytes), so every consumer agrees.negativeConversionblock, so a normal edit or navigation can't strip it; thumbnails regenerate on convert/revert.Notes
🤖 Generated with Claude Code