Вот мой код
Код: Выделить всё
from PIL import Image
import os.path, sys
path = r"D:\test"
dirs = os.listdir(path)
def crop():
for item in dirs:
fullpath = os.path.join(path,item)
if os.path.isfile(fullpath):
im = Image.open(fullpath)
f, e = os.path.splitext(fullpath)
imCrop = im.crop((80, 270, 4000, 3000))
imCrop.save(f + 'Cropped.jpg', "JPEG")
crop()

Подробнее здесь: https://stackoverflow.com/questions/790 ... o-be-apply