koaning / gli

my gleeful scripts for the cli
https://koaning.github.io/gli/
MIT License
2 stars 0 forks source link

resize images #9

Open koaning opened 1 year ago

koaning commented 1 year ago

This idea popped up on the other repo.

from PIL import Image
import glob

def resize():
    for img_name in glob.glob('myimages/*.jpg'):
        im = Image.open(img_name)
        im.thumbnail((200,200))
        im.save(img_name)

resize()