Skip to content

Fix Texture/Denoise blending, speed up thumbnails, dedicated Denoise panel, centralize sidecars - #1572

Open
vinioliveiras wants to merge 6 commits into
CyberTimon:mainfrom
vinioliveiras:combined-fixes-and-improvements
Open

Fix Texture/Denoise blending, speed up thumbnails, dedicated Denoise panel, centralize sidecars#1572
vinioliveiras wants to merge 6 commits into
CyberTimon:mainfrom
vinioliveiras:combined-fixes-and-improvements

Conversation

@vinioliveiras

Copy link
Copy Markdown

Summary

Five independent changes from day-to-day use of the app:

  • Fix Texture: the "Structure" slider is already mapped to Lightroom's Texture on preset import (preset_converter.rs), but its blur radius (40px) was larger than Clarity's (8px) — backwards from real Texture semantics, where Texture is the fine-detail slider and Clarity is the broad one. Lowered to 2.5px so it actually behaves like Texture, and relabeled the slider (en/pt locales) to match. Internal field/JSON key name (structure) is unchanged for compatibility with existing sidecars and the XMP mapping.
  • Smooth AI Denoise tile blending: apply_seamless() blended overlapping denoise tiles with a flat 0.5 multiplier across the whole overlap band instead of a smooth window — a visible seam-artifact risk on tile boundaries. Replaced with a raised-cosine ramp (seam_weight, with a unit test) that still sums to 1.0 across neighboring tiles but fades smoothly.
  • Faster thumbnails: lowered the default thumbnail resolution (720→360, closer to actual grid tile size) and scaled the default worker-thread count with available_parallelism() instead of a flat 4 — both are default-value changes only, still overridable in Settings.
  • Dedicated AI Denoise panel entry: AI Denoise was only reachable via a right-click context-menu entry. Added a button in the Details panel's Noise Reduction section that opens the exact same modal/flow.
  • Centralize .rrdata/.rrexif sidecars: instead of littering every photo folder with a <photo>.rrdata file next to it, sidecars now live under a mirrored folder structure in the app's own data directory (RapidRAW/sidecars/...), with automatic incremental migration on folder browsing. Also adds a purely cosmetic sidecars_by_month/<YYYY-MM>/... view (hard links, not copies) for browsing "what did I edit this month" in Explorer/Finder. .xmp sidecars are untouched (still written next to the photo, unchanged interop behavior).

This last change is the most opinionated one and a real behavior change for existing users (sidecars move out of the photo folder automatically, no opt-out toggle exists yet) — happy to adjust scope, add a setting to keep the old adjacent-to-photo behavior, or split it into its own PR if preferred.

Test plan

  • cargo check / cargo test clean (seam_weight unit test passes)
  • npm run typecheck — no new errors introduced (pre-existing unrelated errors on main confirmed via the same check on main itself)
  • Manually verified on Windows: sidecar migration from the old adjacent-to-photo location, from a prior centralized-but-differently-named location, thumbnail generation speed, Texture vs Clarity behavior on a real photo, Denoise panel button opens the same modal as the context-menu entry
  • Not tested on macOS/Linux — the sidecar relocation's directory resolution should be portable (app_data_dir()-based) but hasn't been run there

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

vinioliveiras and others added 6 commits August 21, 2026 21:09
Structure's local-contrast blur radius (40px) was larger than
Clarity's (8px), backwards from Lightroom's fine-detail Texture
semantics; preset_converter.rs already maps Structure to Lightroom's
Texture on XMP import, so only the radius and UI label needed fixing.

Also replaces the AI denoise tile blend's flat 0.5 overlap weight with
a smooth raised-cosine ramp, removing a potential hard seam at tile
boundaries on strongly denoised images.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
thumbnail_resolution defaulted to 720px, which drove both the final
JPEG size and the GPU/CPU decode target — well above what a library
grid tile actually needs (150-400px). Lowered to 360, cutting
decode/resize/encode cost roughly 4x per thumbnail.

thumbnail_worker_threads defaulted to a flat 4 regardless of the
machine; now scales with available_parallelism() (clamped 4-12),
matching the pattern export_processing.rs already uses for its own
worker count.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
AI Denoise previously only existed behind the right-click "Denoise"
context-menu entry — easy to miss. Adds a button in the Details
panel's Noise Reduction section that opens the exact same modal via
the same denoiseModalState action, reusing the existing flow verbatim
rather than duplicating it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Every edited photo left a "photo.jpg.rrdata" file next to it. Sidecars
now live under app_data_dir()/sidecars, mirroring each photo's own
folder structure (so folder-level discovery keeps working via the
mirrored tree instead of the photo's own folder), with a new
sidecar_paths.rs owning the mirroring/path-construction logic used
everywhere .rrdata is read, written, copied, moved, or renamed.

Legacy .rrexif stays adjacent to the photo by design (unrelated to
this change — it already merges into .rrdata and deletes itself on
next read). Existing .rrdata files are migrated to their new location
automatically and incrementally the first time each folder is browsed
after this update, via list_images_in_dir/list_images_recursive - no
separate migration step or "already migrated" flag needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sidecars now live under a plain RapidRAW/sidecars folder instead of
nested under the full Tauri bundle identifier
(io.github.CyberTimon.RapidRAW) -- easier to find manually in AppData.
tauri.conf.json's identifier itself is untouched, so every other kind
of app data keeps its existing location. sidecar_root_dir does a
one-time move of any sidecars already relocated under the old path so
existing edits aren't orphaned by the rename.

Also adds a purely cosmetic sidecars_by_month/<YYYY-MM>/... tree of
hard links alongside the real (mirrored-folder) sidecar storage, for
browsing "what did I edit this month" in Explorer. Grouped by the
month a sidecar was first written, not the photo's capture date. The
app's own logic never reads through this tree -- link creation is
best-effort and silently skipped on any failure.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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