-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Windows application screenshot #4415
Comments
I don't understand the situation you're describing. Could you rephrase? Depending on what you're talking about, you may find the 'all_screens' argument helpful - https://pillow.readthedocs.io/en/stable/reference/ImageGrab.html#PIL.ImageGrab.PIL.ImageGrab.grab Also, be aware that you've linked to code from a fork of Pillow, not the main Pillow repository itself. |
Sorry for linked to code from a fork of Pillow https://community.windows.com/en-us/stories/virtual-desktop-windows-10 Windows 10 supports virtual desktop itself. Not the Hyper-V function that we used before. If i run a script that take a screen shot after 5 seconds, using imagegrab at desktop3 In this case the screenshot is taken in desktop2 even it's running in desktop3 unfortunately even if i use include_layered_windows, all_screens it only takes screenshots of desktop3 |
Unfortunately, I don't think it is possible to do what you are trying to do. Windows seems to only draw the current desktop, see this Stack Overflow question. |
Then I think this problem can be solved with 'screenshot of a specific application' i successed capturing specific image in other desktop by using this win32gui method. But only if it is visible. capture from desktop1How do you think of implementing 'screenshot of a specific application'? |
PrintWindow uses a different mechanism not involving the Desktop Window Manager (which is AFAIK the layer implementing virtual desktops on Windows), so it makes sense that it works for this. I can see two options for where this could be implemented: |
Is it possible for me to add such C extension on specific part? |
Display related Windows C code is in the |
I've created #8516 to resolve this by adding a |
windows 10 supports built-in virtual desktop. But when I change desktop from A to B while Pillow process takes screenshot in A, then I get B's screenshot.
The thing i want to know is, was this intended? Cause i don't know well about pillow's goal.
If this is not intended, i'm planning to improve window screen grabber
https://github.com/nulano/Pillow/blob/3c311f5619b1b82e2b91cd2a42e3a44b9526755c/src/display.c#L323
The text was updated successfully, but these errors were encountered: