Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@nulano
Copy link
Contributor

@nulano nulano commented Dec 9, 2019

Partially resolves #2028

Alternative to #4198

Changes proposed in this pull request:

  • Add 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 if xdisplay="" is passed (or on Linux), it will grab the default X11 screen (likely from the DISPLAY envvar). A different value can be passed in the xdisplay 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).

@radarhere radarhere changed the title Imagegrab.grab() for Linux with XCB ImageGrab.grab() for Linux with XCB Dec 28, 2019
@python-pillow python-pillow deleted a comment from codecov bot Jan 27, 2020
@python-pillow python-pillow deleted a comment from codecov bot Jan 27, 2020
@python-pillow python-pillow deleted a comment from codecov bot Jan 27, 2020
@python-pillow python-pillow deleted a comment from codecov bot Feb 15, 2020
@python-pillow python-pillow deleted a comment from codecov bot Feb 15, 2020
@radarhere radarhere force-pushed the imagegrab_xcb branch 2 times, most recently from 7adf9df to ed56fa6 Compare February 23, 2020 04:01
@python-pillow python-pillow deleted a comment from codecov bot Feb 23, 2020
@python-pillow python-pillow deleted a comment from codecov bot Feb 23, 2020
@python-pillow python-pillow deleted a comment from codecov bot Mar 9, 2020
@radarhere radarhere force-pushed the imagegrab_xcb branch 2 times, most recently from c48bc1b to 87ab384 Compare March 11, 2020 11:53
@python-pillow python-pillow deleted a comment from codecov bot Mar 11, 2020
@python-pillow python-pillow deleted a comment from codecov bot Mar 24, 2020
This was referenced Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImageGrab on Linux

3 participants