python改变图片尺寸

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')

编程技巧