python screenshot
Project description
The pyscreenshot module can be used to copy the contents of the screen to a PIL or Pillow image memory. Replacement for the ImageGrab Module, which works on Windows only. For handling image memory (e.g. saving to file, converting,..) please read PIL or Pillow documentation.
- Links:
documentation: http://ponty.github.com/pyscreenshot
- Goal:
Pyscreenshot tries to allow to take screenshots without installing 3rd party libraries. It is cross-platform but useful for Linux based distributions. It is only a pure Python wrapper, a thin layer over existing back-ends. Its strategy should work on most Linux distributions: a lot of back-ends are wrapped, if at least one exists then it works, if not then one back-end should be installed. Performance and interactivity are not important for this library.
- Features:
Cross-platform wrapper
Capturing the whole desktop
Capturing an area
some back-ends are based on this discussion: http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux
pure Python library
supported python versions: 2.6, 2.7
- Known problems:
different back-ends generate slightly different images from the same desktop, this should be investigated
ImageMagick creates blackbox on some systems
PyGTK back-end 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,510,510)) # X1,Y1,X2,Y2 im.show()
Installation
General
Ubuntu
sudo apt-get install python-pip sudo pip install pyscreenshot sudo apt-get install python-imaging # optional back-ends sudo apt-get install scrot sudo apt-get install imagemagick sudo apt-get install python-gtk2 sudo apt-get install python-qt4 # optional for examples sudo pip install entrypoint2
Uninstall
# as root pip uninstall pyscreenshot
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyscreenshot-0.3.4.tar.gz.
File metadata
- Download URL: pyscreenshot-0.3.4.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a15ea719e8b6040fa81c735a06f23baf9d3d563a556661c771ec661aee48c60a
|
|
| MD5 |
5ba6972e9af419d8696777fe24e5f72a
|
|
| BLAKE2b-256 |
57f0261b7f68443e600e842eef8c6c9c0563ac82811361b5113f450adcecc55f
|