pyscreeshot是一个Pytho的模块,用来对屏幕进行截屏并拷贝到PILorPillow图像对象中。这是一个纯Pytho库,支持跨平台。
示例代码:
import pyscreeshot as ImageGrab# fullscreeim=ImageGrab.grab()im.show()# part of the screeim=ImageGrab.grab(bbox=(10,10,510,510)) # X1,Y1,X2,Y2im.show()Ubutu下安装:
sudo apt-get istall pytho-pipsudo pip istall pyscreeshotsudo apt-get istall pytho-imagig# optioal back-edssudo apt-get istall scrotsudo apt-get istall imagemagicksudo apt-get istall pytho-gtk2sudo apt-get istall pytho-qt4# optioal for examplessudo pip istall etrypoit2卸载:
# as rootpip uistall pyscreeshot类似的项目还有:
gtkShots
autopy
评论