JPG does not support transparency - RGBA means Red , Green , Blue , Alpha - Alpha is transparency.
JPG
does not support transparency - RGBA
means Red
, Green
, Blue
, Alpha
- Alpha
is transparency.
You need to discard the Alpha
Channel or save as something that supports transparency - like PNG
.
The Image
class has a method convert
which can be used to convert RGBA
to RGB
- after that you will be able to save as JPG
.
Have a look here: the image class doku
im = Image.open("audacious.png")
rgb_im = im.convert('RGB')
rgb_im.save('audacious.jpg')
Adapted from dm2013's answer to Convert png to jpeg using Pillow
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With