主要涉及Brightness/Contrast/Color
调用流程为创建图像增强对象之后,调用对应的enhance函数
from PIL import Image, ImageEnhance
img = Image.open("test.jpg")
bright_enhancer = ImageEnhance.Brightness(img)
# 传入调整系数1.2
bright_img = bright_enhancer.enhance(1.2)
bright_img.show()
contrast_enhancer = ImageEnhance.Contrast(img)
# 传入调整系数1.2
contrast_img = contrast_enhancer.enhance(1.2)
color_enhancer = ImageEnhance.Color(img)
# 传入调整系数1.2
color_img = color_enhancer.enhance(1.2)