使用Python中PIL图形库进行截屏
目的:通过使用Python的一个图形库PIL(Python Image Library)对屏幕进行截图
步骤:
1、下载PIL(路径)并安装
2、新建文件“截屏.py”,右键Edit with IDLE进行编辑
3、输入一下代码
from PIL import ImageGrab
im = ImageGrab.grab()
im.save(r"c:\1.jpg",'jpeg')
print("截屏完成")
4、保存并执行。执行成功输出截屏1.jpg文件
使用Python中PIL图形库进行截屏的更多相关文章
- Python中的图形库
Python中的图形库 根据Python 2.x的官网文档的解释: Graphical User Interfaces with Tk 和 Other Graphical User Interface ...
- 关于python中PIL的安装
python 的PIL安装是一件很蛋痛的事, 如果你要在python 中使用图型程序那怕只是将个图片从二进制流中存盘(例如使用Scrapy 爬网存图),那么都会使用到 PIL 这库,而这个库是出名的难 ...
- 【327】Python 中 PIL 实现图像缩放
参考:Python 中使用PIL中的resize 进行缩放 参考:Python用Pillow(PIL)进行简单的图像操作(模糊.边缘增强.锐利.平滑等) 参考:廖雪峰 - Pillow 实现代码如下: ...
- 在python中使用图形库matplotlib
matplotlib is a python 2D plotting library which produces publication quality figures in a variety o ...
- Python盗号原理-代码实现截屏键盘记录远程发送(不要做坏事)
这年头盗号的从出不穷,不是脱裤就是社工钓鱼.今天呢我们就以前面的几篇技术文章做铺垫,来讲一下python盗号的原理(学习用途,请勿用于违法犯罪),知己知彼方能百战不殆嘛. 脱裤我们就不多提了,无非就是 ...
- python中PIL模块
Image模块 Image模块是在Python PIL图像处理中常见的模块,对图像进行基础操作的功能基本都包含于此模块内.如open.save.conver.show-等功能. open类 Image ...
- Python中PIL及Opencv转化
转载:http://blog.sina.com.cn/s/blog_80ce3a550102w26x.html Convert between Python tuple and list a = (1 ...
- python中PIL.Image和OpenCV图像格式相互转换
PIL.Image转换成OpenCV格式: import cv2 from PIL import Image import numpy image = Image.open("plane.j ...
- python 中PIL.Image和OpenCV图像格式相互转换
PIL.Image转换成OpenCV格式: import cv2 from PIL import Image import numpy image = Image.open("plane ...
随机推荐
- 【Django】--ModelForm组件
ModelForm a.class Meta: model,#对应Model的 fields=None,#字段 exclude=None,#排除字段 labels=None,#提示信息 help_te ...
- 网页端打开手机上的app
iOS/Android 浏览器(h5)及微信中唤起本地APP 在移动互联网,链接是比较重要的传播媒质,但很多时候我们又希望用户能够回到APP中,这就要求APP可以通过浏览器或在微信中被方便地唤起. 这 ...
- 【纯css】响应式图片列表
示例演示 <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF- ...
- 登陆Oracle,报oracle initializationg or shutdown in progress 错误提示
前两天,登陆Oracle,发现登陆不上去了,报”oracle initializationg or shutdown in progress 错误提示” 错误. 然后就想着怎么去解决,首先自己到win ...
- java模拟浏览器上传文件
public static void main(String[] args) { String str = uploadFile("C:/Users/RGKY/Desktop/wKgBHVb ...
- 发布报错:Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store
发布报错:Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store 昨晚上传项目到AppStore,报了这个错,纳尼! ...
- 安装SQL Developer,连接Oracle 12c,创建新用户
1.访问Oracle官网:https://www.oracle.com/index.html,下载SQL Developer 2.安装... 3.打开Sql Developer,右键"创建新 ...
- KVO __ 浅谈
KVO :Key-Value Observing 它提供一种机制,当指定的对象的属性被修改后,则对象就会接受到通知.简单的说就是每次指定的被观察的对象的属性被修改后,KVO就会自动通知相应的观察者了. ...
- Activemq的连接方式
http://blog.csdn.net/liangguo03/article/details/7011227 http://blog.csdn.net/johnnie_deng/article/de ...
- Tensorflow 变量的共享
https://github.com/chenghuige/tensorflow-exp/blob/master/examples/sparse-tensor-classification/ tens ...