from PIL import Image, ImageFilter, ImageDraw, ImageFont, ImageEnhance, ImageFilter
image = Image.open(r'D:/A.jpg')
#w, h = image.size
#print("大小 %d * %d"%(w,h))
#image = image.convert("L") #转换成黑白图片
#image = image.convert("P") #虚化图片
#image.thumbnail((300, 200), Image.ANTIALIAS) #图片压缩,就是缩小,里面两个参数为大小
#Contrast Brightness Sharpness Color
# 对比度 亮度 清晰度 颜色平衡
#enhancer = ImageEnhance.Sharpness(image)
#enhancer.enhance(10).show()
#BLUR CONTOUR DETAIL EDGE_ENHANCE EDGE_ENHANCE_MORE EMBOSS FIND_EDGES SMOOTH SMOOTH_MORE SHARPEN
#模糊 黑白线条 精细 边缘增强 同上 浮雕 变黑了... 光滑 同上 锐化
image = image.filter(ImageFilter.BLUR)
#image.save(r'D:/2.jpg')
image.show()
详细见官网文档:https://pillow.readthedocs.io/en/3.3.x/index.html