Bootstrap

python pillow库_​Python3.6 中 Pillow 库的 Image 类使用心得(随学习进度更新)

​Python3.6 中 Pillow 库的 Image 类使用心得(随学习进度更新)

原创 2018年02月08日 22:20:34 阅读 628

Pillow是Alex Clark等人开发的对PIL(Python Imaging Library)友好的一个分支库。

PIL则是由Fredrik Lundh等人开发的Python图像处理库,它提供了了广泛的文件格式支持,强大的图像处理能力,主要包括图像储存、图像显示、格式转换以及基本的图像处理操作等。

安装方法

警告:

Pillow 和 PIL 不能在一个相同环境下共存,在安装 Pillow 之前请先卸载 PIL 。

Pillow >= 1.0 不再提供 “import Image” 的引用,应当写成 “from PIL import Image”

Pillow >= 2.1.0 不再提供 “import _imaging” 的引用,应当写成 “from PIL.Image import core as _imaging”

注解:

Pillow < 2.0.0 支持 Python 版本 2.4, 2.5, 2.6, 2.7

Pillow >= 2.0.0 < 4.0.0 支持 Python 版本 2.6, 2.7, 3.2, 3.3, 3.4, 3.5

Pillow >= 4.0.0 < 5.0.0 支持 Python 版本 2.7, 3.3, 3.4, 3.5, 3.6

Pillow >= 5.0.0 支持 Python 版本 2.7, 3.4, 3.5, 3.6

基本安装:

##在 Windows、macOS 和 Linux 下我们用 pip 来安装##

<
;