Repository navigation
LR-META-XMP: radial masks keep their inside/outside from Lightroom (fixes #1815) - #1817
Merged
Merged
Conversation
…ixes storytold#1815) crs:Flipped="true" is how Lightroom Classic writes an ordinary radial mask (effect inside); it was read as our invert, so every imported radial applied outside the circle. Established from Lightroom Classic 15.6's exports of synthetic DNGs: - MaskGroupBasedCorrections, Version 2: Flipped is the effect-inside flag; inverting is the component's MaskInverted. - MaskGroupBasedCorrections without Version: inside whatever Flipped says (Lightroom rewrites both values as Flipped=true, Version=2), and its Feather is halved, as Lightroom rescales it on that upgrade. - Legacy CircularGradientBasedCorrections Radial Filter: outside by default, Flipped=true (Invert Mask) is inside. One mapping serves XMP sidecars, DNG-embedded XMP, presets and .lrcat catalog import. LightCraft writes no crs: masks, so there is no writer to match.
bogusyogi
added a commit
to Orthic-Labs/ember
that referenced
this pull request
Oct 15, 2026
…/outside (upstream storytold#1817, fixes upstream storytold#1815) Applied from storytold/lightcraft PR storytold#1817 (open upstream, not yet merged); docs rebranded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thank you @bitshiftza! This landed on main in integration batch 36 (#1843). If you haven't already, please join our Discord: https://discord.gg/artcraft. We'd love to have you there. |
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.
Radial masks from Lightroom keep their inside/outside
Fixes #1815
Cause
crs_masks.rsreadcrs:Flippedon aMask/CircularGradientas LightCraft'sinvert. Lightroom Classic writesFlipped="true"on an ordinary radial mask, whose effect is inside the circle. Every radial mask imported from a catalog, an XMP sidecar, a DNG's embedded XMP or a.lrtemplatepreset therefore came out inverted.What Lightroom's XMP means
These rules were established by round-tripping synthetic DNGs with known masks through Lightroom Classic 15.6, then rendering Lightroom's rewritten XMP in LightCraft:
crs:MaskGroupBasedCorrections,crs:Version2 (what Lightroom writes today)Flipped="true"crs:MaskInvertedon the mask component (already read correctly)crs:MaskGroupBasedCorrectionswithoutcrs:VersionFlippedand rewrites it asFlipped="true",Version="2"crs:MaskInvertedcrs:CircularGradientBasedCorrections(process-2012 Radial Filter)Flipped="true"("Invert Mask"); the default is outsideThe legacy Radial Filter row follows that filter's documented behaviour, which is outside by default with Invert Mask bringing the effect inside. It isn't measured, since no legacy files were available. The old mapping had it backwards too.
Feather. When Lightroom upgrades a version-less radial it halves
Feather(50 → 25, 100 → 50) and renders both the same. So a version-less value is read at half; version 2 values are read as they are. With that, the middle of the fall-off lands within a few percent of the radius of Lightroom's: 0.86 vs 0.87 at feather 25, and 0.73 vs 0.76 at feather 50. The fall-off shape still differs (Lightroom's extends a little past the ellipse edge, ours ends at it); that's a renderer change, left for another time.Tests
All in
crates/engine/src/crs_masks.rs, on synthetic XMP:lightroom_radial_flipped_is_insiderenders a grey frame and checks that the centre brightens and the corners don't;lightroom_radial_mask_inverted_is_outside;versionless_group_radial_is_inside_with_half_the_feather;legacy_radial_filter_is_outside_unless_flipped;lrtemplate_radial_filter_reads_flipped, the path presets and catalog import share;corrections_become_masksnow expectsFlipped="true"to mean inside.All of them fail without the fix.