mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
42 lines
929 B
ReStructuredText
42 lines
929 B
ReStructuredText
.. py:module:: PIL.ImageEnhance
|
|
.. py:currentmodule:: PIL.ImageEnhance
|
|
|
|
:mod:`ImageEnhance` Module
|
|
==========================
|
|
|
|
The :py:mod:`ImageEnhance` module contains a number of classes that can be used
|
|
for image enhancement.
|
|
|
|
Example
|
|
-------
|
|
|
|
Vary the Sharpness of an Image
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. code-block:: python
|
|
|
|
from PIL import ImageEnhance
|
|
|
|
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
|