Repository navigation
LR-EXP-WATERMARK: preview the watermark in the Export dialog (#827) - #843
Merged
bflatastic merged 2 commits intoOct 11, 2026
Merged
Conversation
…ld#827) With Watermark on, the Export dialog shows the first photo it will export (its cached thumbnail) with the watermark drawn as the file will have it. The watermark is redrawn on a copy only when it or the output size changes. draw_watermark_preview scales the 6 px minimum text size and the 1 px minimum shadow offset by the preview size over the export size, so a small watermark doesn't look bigger in the preview than in the file. Exports draw with a scale of 1 and are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 10, 2026
Merged
The preview was capped at 348 × 200 pt, so a portrait photo showed about 130 pt wide. It now spans the dialog for any photo shape. The cached 512 px thumbnail still shows at once; a render at the preview's own pixel size (in 128 px steps) then replaces it, so the wider preview stays sharp. The web build, which has no worker thread, keeps the thumbnail only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 11, 2026
Member
|
Landed in #981 together with #845 and #847 (on top of #833), so all of #827's watermark asks are in. Thanks again, @john01px2022! Generated by Claude Code |
Closed
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.
Part of #827. Adds a watermark preview to the Export dialog, like the preview in Lightroom Classic's watermark editor.
What changed
export::draw_watermark_preview(img, wm, export_short_edge). Text is never drawn smaller than 6 px in an exported file. On a small preview, that minimum made small watermarks look bigger than they come out. The preview now scales the 6 px minimum (and the 1 px minimum shadow offset) by the preview size over the export size, which comes fromoutput_sizeand so follows the Resize settings. Exports call the same code with a scale of 1, so exported files are unchanged.LR-EXP-WATERMARKrow indocs/parity-checklist.mdupdated.Tests
export::tests::watermark_preview_scales_the_minimum_text_size: a watermark held at 6 px in a 150 px export covers the same share of a 600 px preview. Drawn at the export's own size, the preview matches the export byte for byte.headless::tests::export_dialog_previews_the_watermark: no preview without a watermark, and the preview appears when one is turned on.export_dialog_keeps_its_widthstill passes (the preview doesn't widen the dialog).CI
cargo xtask ci: fmt, clippy, heif, parity, layers, assets and wasm pass. Intest, the only failure islightcraft-mcpe2eexport_progress_and_cancel. It fails the same way onmainon this machine (Apple Silicon): the export finishes before the cancel arrives. That's #674, with a fix in #668. Every other workspace test passes.Short windows
The preview makes the Export dialog taller (about 300 pt for a landscape photo and 700 pt for a portrait one at full width), so on a short window more of it runs off screen (#781, which happens even without this PR). #786 fixes that for every dialog. I merged #786 with this branch locally: in a 1400×760 window the dialog scrolls through the preview and watermark settings to the folder and preset rows, and Cancel / OK stay visible. This PR doesn't add its own scrolling, so the two don't conflict.
Merge order note
This PR and the #845 / #847 stack both edit the watermark tests and the
LR-EXP-WATERMARKrow. Whichever lands second has a small conflict (keep both sides). I'll rebase whichever is second.🤖 Generated with Claude Code