首页 / 知识

python中如何使用pil

2023-11-12 13:25:00

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

python中使用pil的方法:

在命令行使用PIP安装:

pipinstallPillow

或在命令行使用easy_install安装:

easy_installPillow

安装完成后,使用fromPILimportImage就引用使用库了。比如:

fromPILimportImage

im=Image.open("bride.webp")

im.rotate(45).show()

示例:

fromPILimportImage

fromPILimportImageFilter

im=Image.open("beauty.webp")

om=im.filter(ImageFilter.BLUR)

om.save("beautyBlur.webp")

以上内容为大家介绍了python中如何使用pil,希望对大家有所帮助,如果想要了解更多Python相关知识,请关注我们

培训示例人数以上功能

最新内容

相关内容

热门文章

推荐文章

标签云

猜你喜欢