from PIL import Image
def out_put(path,size,out_path):
Image.open(path).resize(size).save(out_path)
If__name__ == "__main__":
out_put(path="/home/kali/Downloads/me.jpg",size=(80,100),out_path="/home/kali/Downloads/newme.jpg")
将照片缩小至80 x 100
操作示范使用Python 3.8.5