from PIL import Image
import os
root = "./test"
for file in os.listdir(root):
print(file)
image = Image.open(os.path.join(root,file))
new_image = image.resize((1080,700))
new_image.save(os.path.join(root,file))
python批量resize图片
于 2023-11-21 17:50:23 首次发布