Pillow/docs/reference/ImageEnhance.rst

39 lines
936 B
ReStructuredText
Raw Normal View History

2013-10-13 00:48:34 +04:00
.. py:module:: PIL.ImageEnhance
.. py:currentmodule:: PIL.ImageEnhance
:py:mod:`ImageEnhance` Module
=============================
2013-10-13 00:48:34 +04:00
The :py:mod:`ImageEnhance` module contains a number of classes that can be used
for image enhancement.
2013-10-13 04:14:12 +04:00
Example: Vary the sharpness of an image
---------------------------------------
2013-10-13 00:48:34 +04:00
.. code-block:: python
2013-10-13 00:53:31 +04:00
from PIL import ImageEnhance
2013-10-13 00:48:34 +04:00
enhancer = ImageEnhance.Sharpness(image)
for i in range(8):
factor = i / 4.0
enhancer.enhance(factor).show("Sharpness %f" % factor)
Also see the :file:`enhancer.py` demo program in the :file:`Scripts/`
directory.
Classes
-------
All enhancement classes implement a common interface, containing a single
method:
.. autoclass:: PIL.ImageEnhance._Enhance
:members:
.. autoclass:: PIL.ImageEnhance.Color
.. autoclass:: PIL.ImageEnhance.Contrast
.. autoclass:: PIL.ImageEnhance.Brightness
.. autoclass:: PIL.ImageEnhance.Sharpness