Skip to main content

python screenshot

Project description

The pyscreenshot module can be used to copy the contents of the screen to a PIL image memory or file. Replacement for the ImageGrab Module, which works on Windows only.

Links:
Features:
Known problems:
  • not implemented: Capturing an active window

  • different backends generate slightly different images from the same desktop, this should be investigated

  • ImageMagick creates blackbox on some systems

  • PyGTK backend does not check $DISPLAY -> not working with Xvfb

  • slow: 0.2s - 0.7s

Similar projects:

Usage

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')

Installation

General

  • install setuptools or pip

  • install PIL

  • install at least one backend

  • install the program:

if you have setuptools installed:

# as root
easy_install pyscreenshot

if you have pip installed:

# as root
pip install pyscreenshot

Ubuntu

# one or more
sudo apt-get install scrot
sudo apt-get install imagemagick
sudo apt-get install python-gtk2
sudo apt-get install python-qt4
sudo apt-get install python-wxversion

# Python Imaging Library (required)
sudo apt-get install python-imaging

sudo apt-get install python-setuptools
sudo easy_install pyscreenshot

Uninstall

# as root
pip uninstall pyscreenshot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyscreenshot-0.2.1.tar.gz (35.4 kB view details)

Uploaded Source

File details

Details for the file pyscreenshot-0.2.1.tar.gz.

File metadata

  • Download URL: pyscreenshot-0.2.1.tar.gz
  • Upload date:
  • Size: 35.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyscreenshot-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e32b3aa0576865837566fa1874d03bd42673837bcc68db6a5764082740a0e309
MD5 cab6a0f95f186272475b8d153756051f
BLAKE2b-256 873f2b0e6c14ad0438bd2c6fdb140002c64e03758b991287b1313c73614a5d6f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page