Skip to content

feat: import Lightroom XMP sidecars - #1465

Open
dimafa wants to merge 3 commits into
CyberTimon:mainfrom
dimafa:codex/feat/lightroom-xmp-import
Open

feat: import Lightroom XMP sidecars#1465
dimafa wants to merge 3 commits into
CyberTimon:mainfrom
dimafa:codex/feat/lightroom-xmp-import

Conversation

@dimafa

@dimafa dimafa commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Description

Add a Lightroom and Camera Raw XMP sidecar importer for migrating existing edits and metadata into RapidRAW's non-destructive .rrdata workflow.

This supersedes #1280 and is rebuilt on current main. Thank you to @StephenMasseur for the original implementation and for agreeing to continue the work in a new PR.

The original image and XMP sidecar remain unchanged.

Type of Change

  • New feature
  • Documentation update
  • UI/UX improvement

Changes Made

  • Import XMP adjustments for an individual image from the editor or library context menu.
  • Automatically discover a same-name .xmp sidecar next to the image, with a file-picker fallback.
  • Recursively import matching image/XMP pairs from a folder tree.
  • Support both attribute-based and element-based XMP values.
  • Import current Process Version 2012 adjustments and legacy Lightroom process-version fallbacks.
  • Import crop, crop rotation, and EXIF-orientation-aware crop coordinates.
  • Keep Lightroom "As Shot" white balance neutral in RapidRAW.
  • Convert custom white balance only when the XMP includes an explicit as-shot temperature/tint baseline. Absolute profile-dependent Lightroom WB values are intentionally not guessed.
  • Import supported tone curves, HSL, color grading, detail, noise reduction, vignette, grain, and basic adjustments.
  • Import rating, color-label, and keyword metadata.
  • Refresh affected thumbnails and active editor/library state after import.
  • Show immediate background-import feedback and live progress.
  • Provide a copyable report listing files with no supported changes and files that failed, including error details.
  • Add localized UI strings and document the import workflows in the README.
  • Prevent adjustment attributes in nested Lightroom profile/look descriptions from overwriting the image's active settings.

Screenshots/Videos

Folder context-menu import action

folderMenu

Import-in-progress indicator

statusMessage

Completed import and unchanged/failed-file report

report

Testing

  • I have tested these changes locally and confirmed that they work as expected.

Test Configuration:

  • OS: macOS 26.4
  • Hardware: Apple M5 Pro
  • Files: Sony ARW and Canon CR2 Lightroom libraries
  • Manual coverage:
    • Individual image automatic sidecar discovery
    • Recursive import across a folder containing approximately 1,733 matching sidecars
    • Crop and rotation
    • Current and legacy process versions
    • As-shot and custom white-balance behavior
    • Immediate progress feedback
    • Unchanged and failed-file reporting
    • Visual comparison in Lightroom and RapidRAW

Validation:

Repository-wide TypeScript, ESLint, formatting, and i18n extraction checks currently report failures that are also reproducible on an unchanged upstream/main. The importer-specific i18n extraction issue found during development was fixed.

Checklist

  • My code follows the project's existing style.
  • I haven't added unnecessary AI-generated code comments.
  • My changes generate no new warnings or errors.

Additional Notes

Lightroom and RapidRAW use different camera profiles, control scales, tone curves, processing order, and tone-mapping algorithms. Matching numeric adjustment values therefore do not guarantee pixel-identical output.

Calibrated conversion for exposure, contrast, clarity, dehaze, vibrance, white balance, and other profile-dependent adjustments is deliberately excluded from this PR and planned as a separate follow-up.

AI Disclaimer

  • This PR was handwritten with AI assistance

@dimafa
dimafa marked this pull request as ready for review August 3, 2026 14:12
@dimafa
dimafa requested a review from CyberTimon as a code owner August 3, 2026 14:12
@dimafa

dimafa commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Calibration update: I tested PR #1465 together with PR #1466’s genuine 16-bit TIFF export. The renderer contract and precision checks passed, but neither tested nonlinear Exposure mapping met the acceptance criteria on fresh validation.
The best EV-Shift mapping reduced median error by 32.5% and reached 0.160 EV median error with one material per-image regression. Testing RapidRAW’s separate filmic Exposure control reached 0.148 EV but only 37.5% improvement and materially regressed two images.

So current implementation of the direct 1:1 XMP conversion should stay as implemented in this PR.

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.

1 participant