Skip to content
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

Feature(?): Grab only app's frame #158

Open
mnfro opened this issue Apr 27, 2020 · 3 comments
Open

Feature(?): Grab only app's frame #158

mnfro opened this issue Apr 27, 2020 · 3 comments

Comments

@mnfro
Copy link

mnfro commented Apr 27, 2020

General information:

  • OS name: macOS Catalina
  • OS version: 10.15.4
  • Python version: 3.7.7
  • MSS version: last

Description

Is there a way to capture only the frame of a specific app window? I mean with built-in macOS screencapture, I can do something like this to get a screenshot of a particular app:

os.system("screencapture {options} -l {window} {filename}")

where {window} represents the windowID of the app, in my case QuickTime Player app ID (obtained from Quartz).

Being able to specify which app I want to take the screenshot of would result in a more flexibility, as I can move the app window wherever I want and I don't need to set any kind of boundary (top,left,width,height).

cheers, mate!

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@BoboTiG
Copy link
Owner

BoboTiG commented Apr 27, 2020

Hey,

Yes, it would be cool to have it! Another thing on my TODO list ;)

@xXSkyWalkerXx1
Copy link

You can write a while-loop, which gets the rectangle of the app via his PID - this rectangle you can set as argument on the mss.grab function.

@BanditTech
Copy link

I just wrote a solution for this request here #180 and it is indeed possible. I am currently attempting to edit this library to provide the function, but I am not sure how far I will progress on my own :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants