0

How to insert picture in python

How to insert picture in python

25th Apr 2020, 9:20 AM
Najib Shaikh
Najib Shaikh - avatar
1 Answer
+ 7
Try the following: from PIL import Image import glob, os size = 128, 128 for infile in glob.glob("*.jpg"): file, ext = os.path.splitext(infile) im = Image.open(infile) im.thumbnail(size, Image.ANTIALIAS) im.save(file + ".thumbnail", "JPEG")
25th Apr 2020, 9:36 AM
F L a Z z Y
F L a Z z Y - avatar