Skip to content

Use absolute values for watermark size and location #18104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wohler opened this issue Dec 29, 2024 · 4 comments
Open

Use absolute values for watermark size and location #18104

wohler opened this issue Dec 29, 2024 · 4 comments
Labels
difficulty: hard big changes across different parts of the code base feature: new new features to add no-issue-activity scope: image processing correcting pixels scope: UI user interface and interactions

Comments

@wohler
Copy link

wohler commented Dec 29, 2024

Sizing and locating watermark text seems more difficult than it should be.

I have discovered that that the scale on > advanced options > smaller image border > marker height allows me to use the same scale for all aspect ratios and achieve a constant text height. However, I still have to have separate presents for each aspect ratio to account for different x and y offsets, and if I have to move the watermark to a different location, I have to tweak the offsets again.

I'd love to be able to set the absolute height of a textual watermark and be able to anchor its outer corner in such a way so that a single watermark present would work for portrait, square, and landscape images for text of any length, and would not require additional location tweaking if the location (upper left, lower right, and so on) was changed.

For example, let's say I set the text height to 20 pixels and the distance to corner of 20x20 pixels.

Then, no matter how wide the text is, the height would always be the same. No matter the size of the image, the height would always be the same. If I leave the default location in the lower right-hand corner, the lower right-hand extent of the text would be 20 pixels from the right edge and 20 pixels from the bottom edge. If I selected the upper right-hand corner, the upper left-hand extent of the text would be 20 pixels from the left edge and 20 pixels from the top edge.

In other words, no matter the length of the text, the size of the image, or the location of the watermark, I would not have to tweak the watermark size and location settings.

And then I could have a single preset with these settings.

A related issue is #12813.

@ralfbrown
Copy link
Collaborator

All of darktable's modules use resolution-independent coordinates - that's what allows presets and styles to be applied to any image. But all bets are off if you want to move things around from image to image....

It should be possible to create an SVG file which will force the text to a certain fraction of the image height, but absolute pixel sizing and positioning won't be possible without re-architecting things.

@ralfbrown ralfbrown added feature: new new features to add difficulty: hard big changes across different parts of the code base scope: UI user interface and interactions scope: image processing correcting pixels labels Dec 29, 2024
@wohler
Copy link
Author

wohler commented Dec 29, 2024

Thanks! Now that you mention it, pixels probably isn't what I want since the resolution can vary.

If we were to, say, change "pixels" to "mm" in this request, would that then be doable?

@ralfbrown
Copy link
Collaborator

If you assume a fixed print size, "mm" is just the current resolution-independent coordinate. If you want the "mm" at a fixed PPI so that print size scales with image resolution, it's just a roundabout way of specifying pixels.

Copy link

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: hard big changes across different parts of the code base feature: new new features to add no-issue-activity scope: image processing correcting pixels scope: UI user interface and interactions
Projects
None yet
Development

No branches or pull requests

2 participants