【每日coding】保存图片

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)

 

你可能感兴趣的:(Everyday,code,python)