Python 06 Geany的基本使用2

原文:https://www.cnblogs.com/denny402/p/5096001.html

功能:打开图片

1、下载库

pip install matplotlib

2、编写代码,将代码粘贴到Geany,运行一下就可以看效果了
  功能:查看图片

from PIL import Image
import matplotlib.pyplot as plt
img=Image.open('d:/dog.png')
plt.figure("dog")
plt.imshow(img)
plt.show()
原文地址:https://www.cnblogs.com/guxingy/p/11200972.html