Taking Screen shots of specific size
Question: What imaging modules for python will allow you to take a specific size
screenshot (not whole screen)? I have tried PIL, but can't seem to make
ImageGrab.grab() select a small rectangle and i have tried PyGame but i can't
make it take a screen shot outside of it's main display panel


Answer: You can use [pyscreenshot](https://pypi.python.org/pypi/pyscreenshot) module.  
The `pyscreenshot` module can be used to copy the contents of the screen to a
`PIL` image memory or file. You can install it using `pip`.

    
    
    $ sudo pip install pyscreenshot
    

Usage:

    
    
    import pyscreenshot as ImageGrab
    # fullscreen
    im=ImageGrab.grab()
    im.show()
    
    # part of the screen
    im=ImageGrab.grab(bbox=(10,10,500,500))
    im.show()
    
    # to file
    ImageGrab.grab_to_file('im.png')
    

