📜  将多个图像调整为相同大小的python代码示例

📅  最后修改于: 2022-03-11 14:45:57.743000             🧑  作者: Mango

代码示例1
import PIL
import os
import os.path
from PIL import Image

f = r'c://Users/xx/Desktop/imagetest'
for file in os.listdir(f):
    f_img = f+"/"+file
    img = Image.open(f_img)
    img = img.resize((2296,1724))
    img.save(f_img)