from PIL import Image def change_image_size(image_path,size=(600,600)): img = Image.open(image_path) img = img.resize(size) #img.thumbnail(size,Image.ANTIALIAS) //缩放 img.save('./result.jpg') change_image_size('image.jpg')
原创文章,作者:Maggie-Hunter,如若转载,请注明出处:https://blog.ytso.com/8196.html