11行python代码实现把webp转jpg格式图片(同路径下)
from os import
from PIL import Image
PATH = r"C:UsersAdministratorDesktop"
for root, dirs, files
代码可以高亮:
from os import *
from PIL import Image
PATH = r"C:\Users\Administrator\Desktop"
for root, dirs, files in walk(PATH):
for f in files:
if path.splitext(f)[1] == ".webp":
img = Image.open(f)
img.load()
img.save(f[0:-5] + ".jpg")
remove(f)
下面的 选择框选择 python 就可以