Skip to content

Conversation

@Ostap4ello
Copy link

This fixes that some pyscreenshot backends can make screenshots with different sizes then absolute window size (f.e. beacause of screen scaling) by resizing the image to the desited size.

…ned correctly because of custom screen scale
@Ostap4ello Ostap4ello closed this Jul 11, 2025
@Ostap4ello Ostap4ello reopened this Jul 11, 2025
@Ostap4ello
Copy link
Author

Sorry, 'done that by mistake
Should have pinned that to the issue #62

@AlfredoSequeida
Copy link
Owner

Hey, thank you for contributing! This looks fine for me, but I would like to test it some how. Can you give me a way to recreate the issue you were seeing so that I can try to replicate the issue and see how your fix behaves?

@Ostap4ello
Copy link
Author

Hi,
thank you for taking a look at my pull request!

To recreate the issue you should use opencv backend to generate hints. In Hyprland you shall set scale of monitor to more than 1.0. For example, 1.6. When running hints -m hint (or starting 'hints' mode by any other way) you shall notice hints being not on their places.
That is due to screnshot being not aligned to scaled monitor (thus scaled window) size.

Here's example of what you should see:
image

- ostap4ello

@AlfredoSequeida
Copy link
Owner

Sorry for waiting on this. But I just now got around to working on hints.

So for whatever reason, I can't replicate this. I tried using the opencv backend on hyprland (in a terminal) with a monitor scale of 2 as well as 0.6 and the position of the hints were not misaligned for me. I wonder if there is something else that could be throwing positioning off for you.

Have you modified your hints config at all? Maybe your have an offset there?

Worst case scenario, I don't mind merging this, but maybe we can make it an option in the hints config instead to prevent unnecessary image scaling, which could result in heavier tasks for large displays (where the screenshots are very high resolution). This is to prevent the extra image processing from delaying hints showing up.

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.

2 participants