Python中的截屏模块 pyscreenshot
前言
pyscreenshot 是一个 Python 的模块,用来对屏幕进行截屏并拷贝到 PIL or Pillow 图像对象中。这是一个纯 Python 库,支持跨平台。
示例代码:
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()
1 2 3 4 5 6 7 8 9
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
卸载:
as root
pip uninstall pyscreenshot
类似的项目还有:
gtkShots
autopy
相关推荐
liyansring 2020-08-15
liym 2020-07-20
katanaFlower 2020-07-05
JM 2020-06-21
zhangpan 2020-06-11
greent00 2020-06-10
liai 2020-08-09
changecan 2020-11-19
sunnnyduan 2020-10-16
lonesomer 2020-09-17
houdaiye 2020-09-23
XPZ0 2020-09-22
changecan 2020-09-22
jackadmi 2020-09-11
yuan00yu 2020-08-24
yserver 2020-08-15
山有木兮卿有意 2020-08-03
85206633 2020-07-28