Why Matplotlib. Pyplot. Imsave() and Matplotlib. Pyplot. Imshow() Image Qualities Are Different? How to Ensure the Same Quality?
Seems Matplotlib. Imsave() Lightens the Image When Compared to That of Matplotlib. Imshow(). for Example, Look at the Code Below. Import Imageio Import...
Seems matplotlib.imsave() lightens the image when compared to that of matplotlib.imshow(). For example, look at the code below.
import imageio
import matplotlib.pyplot as plt
image = imageio.imread('image.jpg')
plt.imshow(image)
plt.imsave('image_new.jpg',image )
image_new = imageio.imread('image_new.jpg')
plt.imshow(image_new)
Saved image 'image_new.jpg' (right) is slightly lighter than 'image.jpg' (left)
image_source: