-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
ImageGrab.grab() for Linux with XCB #4260
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
radarhere
reviewed
Dec 28, 2019
8f316a0
to
4f77162
Compare
bce25ae
to
39b5b54
Compare
39b5b54
to
6b559f5
Compare
7adf9df
to
ed56fa6
Compare
c48bc1b
to
87ab384
Compare
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
87ab384
to
d7c3451
Compare
This was referenced Mar 17, 2021
Bump pillow from 4.0.0 to 7.1.0 in /study_material/intro-to-tensorflow
tiandiao123/deep_learning#121
Merged
Merged
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially resolves #2028
Alternative to #4198
Changes proposed in this pull request:
ImageGrab.grab()
support for X11 (Linux) using the XCB library (only screenshots for now, clipboard can be added in the future)There is also support for taking X11 screenshots on Windows and macOS (where X11 can be installed as a separate window manager). This proposed implementation uses the old methods if
xdisplay=None
is passed, but ifxdisplay=""
is passed (or on Linux), it will grab the default X11 screen (likely from the DISPLAY envvar). A different value can be passed in thexdisplay
parameter to override the default X11 screen address.Unlike mss which uses Xlib, this uses XCB. This provides more resilient error handling at the cost of potentially slightly lower OS compatibility (Xlib is older).