Skip to content

Latest commit

 

History

History
81 lines (54 loc) · 2.44 KB

ImageEnhance.rst

File metadata and controls

81 lines (54 loc) · 2.44 KB

:py~PIL.ImageEnhance Module

The :py~PIL.ImageEnhance module contains a number of classes that can be used for image enhancement.

Example: Vary the sharpness of an image

from PIL import ImageEnhance

enhancer = ImageEnhance.Sharpness(image)

for i in range(8):
    factor = i / 4.0
    enhancer.enhance(factor).show(f"Sharpness {factor:f}")

Also see the enhancer.py demo program in the Scripts/ directory.

Classes

All enhancement classes implement a common interface, containing a single method: