from PIL import Image from PIL import ImageEnhance from PIL import ImageFilter im = Image.open("C:\Users\Leeing\Pictures\微信图片_20191128212811.jpg")#读图片 im.thumbnail((128,128)) im=im.convert('RGB') im.save("a_small.jpg","JPEG") r,g,b = im.split() om =Image.merge("RGB",(b,g,r)) om.save("b_changecolor.jpg","JPEG") pm= im.filter(ImageFilter.CONTOUR) pm.save("c_contour.jpg","JPEG") qm = ImageEnhance.Contrast(im) qm.enhance(20).save("d_EnContrast.jpg","JPEG")