<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html> <head> <meta http-equiv='Content-Type' content='text/html; charset=us-ascii' /> <title>The PIL.ImageGrab Module</title> <link rel='stylesheet' href='effbot.css' type='text/css' /> </head> <body> <h1>The PIL.ImageGrab Module</h1> <p>(New in 1.1.3) The <b>ImageGrab</b> module can be used to copy the contents of the screen to a PIL image memory. </p><p> The current version works on Windows only.</p> <h2>Module Contents</h2> <dl> <dt><a id='PIL.ImageGrab.grab-function' name='PIL.ImageGrab.grab-function'><b>grab(bbox=None)</b></a> [<a href='#PIL.ImageGrab.grab-function'>#</a>]</dt> <dd> <p>(New in 1.1.3) Take a snapshot of the screen. The pixels inside the bounding box are returned as an "RGB" image. If the bounding box is omitted, the entire screen is copied.</p> <dl> <dt><i>bbox</i></dt> <dd> What region to copy. Default is the entire screen.</dd> <dt>Returns:</dt> <dd> An image</dd> </dl><br /> </dd> <dt><a id='PIL.ImageGrab.grabclipboard-function' name='PIL.ImageGrab.grabclipboard-function'><b>grabclipboard()</b></a> [<a href='#PIL.ImageGrab.grabclipboard-function'>#</a>]</dt> <dd> <p>(New in 1.1.4) Take a snapshot of the clipboard image, if any.</p> <dl> <dt>Returns:</dt> <dd> An image, a list of filenames, or None if the clipboard does not contain image data or filenames. Note that if a list is returned, the filenames may not represent image files.</dd> </dl><br /> </dd> </dl> </body></html>