成都网站建设设计

将想法与焦点和您一起共享

创新互联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://chengdu.cdxwcx.cn/article/djphogs.html