In my program, I need to convert the .png file to a .jpg file, but I do not want to save the file to disk. I am currently using
>>> from PIL import Imag >>> ima=Image.open("img.png") >>> ima.save("ima.jpg")
But this saves the file to disk. I do not want to save this to disk, but it will convert to .jpg as an object. How can i do this?
Vivek source share