创新互联Python教程:python中如何使用pil-成都创新互联网站建设

关于创新互联

多方位宣传企业产品与服务 突出企业形象

公司简介 公司的服务 荣誉资质 新闻动态 联系我们

创新互联Python教程:python中如何使用pil

PIL(python Image Library)是python的第三方图像处理库,但是由于其强大的功能与众多的使用人数,几乎已经被认为是python官方图像处理库了。

创新互联建站从2013年开始,先为云南等服务建站,云南等地企业,进行企业商务咨询服务。为云南企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

python中使用pil的方法:

在命令行使用PIP安装:

pip install Pillow

或在命令行使用easy_install安装:

easy_install Pillow

安装完成后,使用from PIL import Image就引用使用库了。比如:

from PIL import Image
im = Image.open("bride.jpg")
im.rotate(45).show()

示例:

from PIL import Image
from PIL import ImageFilter
im = Image.open("beauty.jpg")
om = im.filter(ImageFilter.BLUR)
om.save("beautyBlur.jpg")

当前文章:创新互联Python教程:python中如何使用pil
本文来源:http://kswsj.cn/article/djphogs.html

其他资讯