I need to replace the transparency layer of a png image with a color white. I tried this
from PIL import Image
image = Image.open('test.png')
new_image = image.convert('RGB', colors=255)
new_image.save('test.jpg', quality=75)
but the transparency layer turned black. Anyone can help me?