[Image-SIG] PIL ImageGrab with multi-monitors.

Bruce B. Buckley buckleybruceb at gmail.com
Fri Jun 20 10:24:25 CEST 2008


I have recently been using PIL 1.1.6 for Python 2.5, with MS Windows XP Pro, 
and the ImageGrab module works fine with my Tkinter application, with one 
exception, as follows:

The built-in driver used
    1) grabber = Image.core.grabscreen
    2) size, data = grabber()
returns the monitor size (in my case of 1920,1200), but always defaults to the 
first monitor-0.

Since up to five multiple monitors will be used, my application needs to be 
able to grab a cropped image from whichever monitor is specified. As far as I 
can tell, only access to monitor-0 is provided as the default, with no other 
options available.

I have no problem programmatically creating and moving Tkinter windows to any 
screen, as MS Windows and Tcl/Tk support multiple monitors.

Since PIL has been available for years, and multi-monitors are quite common 
now, I am surprised that the "grab" feature seems to be still limited to one 
monitor.

Fredrik Lundh has provided a powerful and comprehensive package, so there is a 
good chance that it can do what I want, and that I may be overlooking some 
aspect of the system.

I hope my assessment is wrong, and, of course, any help or other comments will 
be greatly appreciated.

B.B.Buckley 



More information about the Image-SIG mailing list