2018-08-02から1日間の記事一覧

Python / PIL / 画像を読み込む / PIL.Image.open(ファイルパス)

PIL

from PIL import Image import matplotlib.pyplot as plt def showImg(imgPath): srcImg = Image.open(imgPath) plt.imshow(srcImg) plt.show() showImg("C:\\Users\\NEC-PCuser\\Desktop\\akiho.png") 実行結果: