【每日coding】读取文件并显示
程序员文章站
2022-03-21 16:29:18
...
def pyplot_show(path):
import matplotlib.pyplot as plt
img = plt.imread(path) #numpy.ndarray
plt.figure("image")
plt.imshow(img)
plt.pause(5)
if __name__ == '__main__':
path = '../data/imgs/hdrplus.png'
pyplot_show(path)