使用python讀取webp格式圖像
from PIL import Image
import pdb;pdb.set_trace()
filename = '000.webp'
im = Image.open(filename)
if im.mode == "RGBA":
im.load() # required for png.split()
background = Image.new("RGB", im.size, (255, 255, 255))
background.paste(im, mask=im.split()[3])
save_name = filename.replace('webp', 'jpg')
im.save('{}'.format(save_name), 'JPEG')
One 、 Introduction to the topi