I have looked at the below links to see how to convert PNG
to JPG
:
- How to get alpha value of a PNG image with PIL?
- PIL Convert PNG or GIF with Transparency to JPG without
The conversion works as expected, but when the image color itself is not black! I have the below image:
And the code is:
im.convert('RGB').save('test.jpg', 'JPEG')
It makes the whole picture black. How should I convert this PNG in correct format and color? The color can be anything from black to white.