如何从.png图像中删除透明背景

时间:2019-10-19 15:18:00

标签: python python-imaging-library

我尝试删除.png图像的透明背景,然后将其缩放到图像的可见内容。

1 个答案:

答案 0 :(得分:0)

要从A图片中删除RGBA,只需使用:

RGBimage = RGBAimage.convert('RGB')

要修剪图像,请使用Image.getbbox()。文档here

相关问题