Converting RGBA to RGB with Python 3 + PIL / Pillow from PIL import Image def rgba_to_rgb(image): image.load() backg = Image.new("RGB", png.size, (255, 255, 255)) backg.paste(png, mask=png.split()[3]) # 3 is the alpha channel return backg