创新互联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


咨询
建站咨询
