前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >flask pillow图片处理(flask 79)

flask pillow图片处理(flask 79)

作者头像
用户5760343
发布2019-08-20 16:31:38
8330
发布2019-08-20 16:31:38
举报
文章被收录于专栏:sktj

抓屏

!/usr/local/bin/python

from PIL import ImageGrab

get current screen copy

image = ImageGrab.grab()

display image size

print("Current screen shot size :",image.size)

display image mode

print("Screen shot picture mode :", image.mode)

save picture to /tmp/screen-grab-1.bmp

image.save('/tmp/screen-grab-1.bmp')

show picture

image.show()

滤镜

from PIL import ImageFilter, Image

src_image = Image.open('/tmp/screen-grab-1.bmp')

print("begin to filter the pic")

dst_image = src_image.filter(ImageFilter.CONTOUR)

print("picture through filter")

dst_image.show()

旋转

from PIL import Image

src_image = Image.open('/tmp/screen-grab-1.bmp')

print("begin to rotate the pic")

dst_image = src_image.rotate(90)

print("picture after rotating")

dst_image.show()

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019.08.13 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 抓屏
  • !/usr/local/bin/python
  • get current screen copy
  • display image size
  • display image mode
  • save picture to /tmp/screen-grab-1.bmp
  • show picture
  • 滤镜
  • 旋转
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档