rmback.py 226 B

12345678
  1. from PIL import Image
  2. # 输入已经去除背景的图像
  3. im = Image.open('./src/assets/logo.png')
  4. x, y = im.size
  5. p = Image.new('RGBA', im.size, (255, 255, 255))
  6. p.paste(im, (0, 0, x, y), im)
  7. p.save('./src/assets/logo2.png')