Skip to content

Conversation

@nulano
Copy link
Contributor

@nulano nulano commented May 8, 2023

Alternative to #7139

From #7100 (comment)

Is the problem just a user trying to ignore gnome-screenshot when it is installed in favour of Image.core.grabscreen_x11? If so, then ImageGrab.grab(xdisplay=":0") should be sufficient with the current version of Pillow.

[...] I have just tested setting xdisplay=':0', and it ran on my end without any white flash. I believe this usage needs to be tested across different platforms. If the test is successful, it should be set as the default option. [...]

if bbox:
im = im.crop(bbox)
return im
except OSError:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original error in #6312 was:

builtins.OSError: X get_image failed: error 8 (73, 0, 1315)

@hugovk hugovk merged commit 34ff170 into python-pillow:main May 14, 2023
@nulano nulano deleted the imagegrab-prefer-xcb branch May 14, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants