我需要用白色替换png图像的透明层。我试过了
from PIL import Image image = Image.open('test.png') new_image = image.convert('RGB', colors=255) new_image.save('test.jpg', quality=75)
但透明层变成黑色。有人可以帮助我吗?
python image python-3.x pillow
image ×1
pillow ×1
python ×1
python-3.x ×1