#encoding=utf-8
fromPILimportImage,ImageFilter
im = Image.open("meinv.jpg")
#顯示圖片
#im.show()
#縮放圖片尺寸
w,h = im.size
im.thumbnail((w//2,h//2))
im.save('thumbnail.jpg','jpeg')
#濾鏡效果
im2 = Image.open('thumbnail.jpg')
imBlur = im2.filter(ImageFilter.BLUR)
imBlur.save('blur.jpg','jpeg')
#細(xì)節(jié)增強(qiáng)濾波
im3 = Image.open('thumbnail.jpg')
imDetail = im3.filter(ImageFilter.DETAIL)
imDetail.save('detail.jpg','jpeg')