Pillow/docs/reference/ImageFilter.rst

48 lines
1.1 KiB
ReStructuredText
Raw Normal View History

2013-10-13 03:49:32 +04:00
.. py:module:: PIL.ImageFilter
.. py:currentmodule:: PIL.ImageFilter
:mod:`ImageFilter` Module
=========================
The :py:mod:`ImageFilter` module contains definitions for a pre-defined set of
filters, which can be be used with :py:meth:`Image.filter()
<PIL.Image.Image.filter>`.
Example Filter an image
-----------------------
.. code-block:: python
import ImageFilter
im1 = im.filter(ImageFilter.BLUR)
im2 = im.filter(ImageFilter.MinFilter(3))
im3 = im.filter(ImageFilter.MinFilter) # same as MinFilter(3)
Filters
-------
The current version of the library provides the following set of predefined
image enhancement filters:
* **BLUR**
* **CONTOUR**
* **DETAIL**
* **EDGE_ENHANCE**
* **EDGE_ENHANCE_MORE**
* **EMBOSS**
* **FIND_EDGES**
* **SMOOTH**
* **SMOOTH_MORE**
* **SHARPEN**
.. autoclass:: PIL.ImageFilter.GaussianBlur
.. autoclass:: PIL.ImageFilter.UnsharpMask
.. autoclass:: PIL.ImageFilter.Kernel
.. autoclass:: PIL.ImageFilter.RankFilter
.. autoclass:: PIL.ImageFilter.MedianFilter
.. autoclass:: PIL.ImageFilter.MinFilter
.. autoclass:: PIL.ImageFilter.MaxFilter
.. autoclass:: PIL.ImageFilter.ModeFilter