Archive

Posts Tagged ‘screenshot’

screenshot.py

July 26, 2015 Leave a comment

I made a simple wrapper script called screenshot.py that calls phantomjs and convert to do the real job. The advantage of screenshot.py is its very simple usage.

Usage

screenshot.py -full http://reddit.com full.jpg

Screenshot of the entire page (can be very high).

screenshot.py -window http://reddit.com window.jpg

Screenshot of the area that you see in the browser.

screenshot.py -thumb http://reddit.com thumb.jpg

Thumbnail of the area that you see in the browser.

Links

taking screenshots with pyscreenshot

November 30, 2011 Leave a comment

The pyscreenshot module can be used to copy the contents of the screen to a PIL image memory or file.

Installation

sudo pip install pyscreenshot

Example

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')
Categories: python Tags: