Pillow模塊提供了豐富的圖像處理功能,並且很多其它模塊使用到該模塊。
- 安裝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