Can anyone help me to read .tiff image and convert into jpeg format?
from PIL import Image
im = Image.open('test.tiff')
im.save('test.jpeg')
The above code was not working.
Can anyone help me to read .tiff image and convert into jpeg format?
from PIL import Image
im = Image.open('test.tiff')
im.save('test.jpeg')
The above code was not working.
I tried to save directly to jpeg but the error indicated that the mode was P and uncompatible with JPEG format so you have to convert it to RGB mode as follow.
I have successfully solved the issue. I posted the code to read the tiff files in a folder and convert into jpeg automatically.