[Python]Windows系统下安装Pillow模块

Pillow模块提供了丰富的图像处理功能,并且很多其它模块使用到该模块。

  1. 安装Pillow模块。使用以下命令:

pip install Pillow

2. 使用举例

#导入Image

from PIL import Image

#打开图片

img = Image.open("d:\qr.png")

#显示图片

img.show()

  3. 详细教程请参考:https://pillow.readthedocs.io/en/5.1.x/handbook/index.html

原文地址:https://www.cnblogs.com/syh6324/p/9501450.html