RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
创新互联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://www.jxjierui.cn/article/djphogs.html