1. 程式人生 > >[Python]Windows系統下安裝Pillow模塊

[Python]Windows系統下安裝Pillow模塊

targe imp mage gin 其它 pill 模塊 block ocs

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

[Python]Windows系統下安裝Pillow模塊