Skip to content

Conversation

@radarhere
Copy link

@radarhere radarhere commented Jul 9, 2025

Suggestion for python-pillow#9070

Here's the best idea I could come up with.

One of the screencapture flags is

-o In window capture mode, do not capture the shadow of the window.

Excluding the shadow changes the size of the window. So if we take two screenshots of a window, we can measure the size of the shadow.

On a retina screen, the shadow is twice as wide as it is on a non-retina screen.

It is possible that a window doesn't have a shadow, but perhaps that can be considered an edge case.

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