from PIl import Image, ImageFilter import os img_path = "some_location" for image in os.listdir(img_path): img = Image.open(image) new_img = img.