I want to convert .png image with transparency to .jpg with PIL in python. When i use the "convert" method it says that i cant handle the alpha background.
from PIL import Image
import os
i = Image.open('hi.png')
i.convert('RGB')
i.save(os.path.join(current_app.root_path, 'folder to be sved to', 'hi.jpg'))
It should convert it to .jpg but throws this error 'OSError: cannot write mode RGBA as JPEG'