def save(path):
import matplotlib.pyplot as plt
img = plt.imread(path)
plt.figure("image")
plt.imshow(img)
plt.pause(3)
plt.imsave("out.jpeg", img)
plt.imsave("out.png", img)
if __name__ == '__main__':
path = '../data/imgs/hdrplus.png'
save(path)