from PIL import Image
import glob, os
size = 270, 360
for infile in glob.glob(r"./*.jpg"):
file, ext = os.path.splitext(infile)
im = Image.open(infile)
im.thumbnail(size)
im.save(r"../xcupdata/"+file+".jpg")
from PIL import Image
import glob, os
size = 270, 360
for infile in glob.glob(r"./*.jpg"):
file, ext = os.path.splitext(infile)
im = Image.open(infile)
im.thumbnail(size)
im.save(r"../xcupdata/"+file+".jpg")