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
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
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。