cannot write mode RGBA as JPEG

JPG does not support transparencyRGBA means Red, Green, Blue, AlphaAlpha 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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)