Last active
August 29, 2015 13:56
-
-
Save iraycd/9171016 to your computer and use it in GitHub Desktop.
Simple script for making square images.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image,ImageOps | |
import os | |
dir = os.listdir('./') | |
size = (300,300) # To the size 300 | |
for i in dir: | |
image = Image.open(i) | |
thumb = ImageOps.fit(image, size, Image.ANTIALIAS) | |
thumb.save(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment