python通过pil生成缩略图的简单代码,这段代码会强行将图片大小修改成250×156
from PIL import Image img = Image.open('sharejs.jpg') img = img.resize((250, 156), Image.ANTIALIAS) img.save('sharejs_small.jpg')
python通过pil生成缩略图的简单代码,这段代码会强行将图片大小修改成250×156
from PIL import Image img = Image.open('sharejs.jpg') img = img.resize((250, 156), Image.ANTIALIAS) img.save('sharejs_small.jpg')