記住這個 resize()方法

from PIL import Image img=Image.open("test.png") x,y=img.size print(x,y) k=5 x=int(x*k) y=int(y*k) newimg=img.resize((x,y),Image.ANTIALIAS) newimg.show() newimg.save("touming.png")
這個函數img.resize((width, height),Image.ANTIALIAS)
第二個參數:
Image.NEAREST :低質量
Image.BILINEAR:雙線性
Image.BICUBIC :三次樣條插值
Image.ANTIALIAS:高質量