







The PIL.ImageFilter Module


BLUR (class)  [ #PIL.ImageFilter.BLUR-class# ]

Blur filter.

For more information about this class, see #PIL.ImageFilter.BLUR-classThe BLUR Class .


CONTOUR (class)  [ #PIL.ImageFilter.CONTOUR-class# ]

Contour filter.

For more information about this class, see #PIL.ImageFilter.CONTOUR-classThe CONTOUR Class .


DETAIL (class)  [ #PIL.ImageFilter.DETAIL-class# ]

Detail filter.

For more information about this class, see #PIL.ImageFilter.DETAIL-classThe DETAIL Class .


EDGE_ENHANCE (class)  [ #PIL.ImageFilter.EDGE_ENHANCE-class# ]

Edge enhancement filter.

For more information about this class, see #PIL.ImageFilter.EDGE_ENHANCE-classThe EDGE_ENHANCE Class .


EDGE_ENHANCE_MORE (class)  [ #PIL.ImageFilter.EDGE_ENHANCE_MORE-class# ]

Stronger edge enhancement filter.

For more information about this class, see #PIL.ImageFilter.EDGE_ENHANCE_MORE-classThe EDGE_ENHANCE_MORE Class .


EMBOSS (class)  [ #PIL.ImageFilter.EMBOSS-class# ]

Embossing filter.

For more information about this class, see #PIL.ImageFilter.EMBOSS-classThe EMBOSS Class .


FIND_EDGES (class)  [ #PIL.ImageFilter.FIND_EDGES-class# ]

Edge-finding filter.

For more information about this class, see #PIL.ImageFilter.FIND_EDGES-classThe FIND_EDGES Class .


Kernel(size, kernel, **options) (class) [ #PIL.ImageFilter.Kernel-class# ]

Convolution filter kernel.

For more information about this class, see #PIL.ImageFilter.Kernel-classThe Kernel Class .


MaxFilter(size=3) (class) [ #PIL.ImageFilter.MaxFilter-class# ]

Max filter.

For more information about this class, see #PIL.ImageFilter.MaxFilter-classThe MaxFilter Class .


MedianFilter(size=3) (class) [ #PIL.ImageFilter.MedianFilter-class# ]

Median filter.

For more information about this class, see #PIL.ImageFilter.MedianFilter-classThe MedianFilter Class .


MinFilter(size=3) (class) [ #PIL.ImageFilter.MinFilter-class# ]

Min filter.

For more information about this class, see #PIL.ImageFilter.MinFilter-classThe MinFilter Class .


ModeFilter(size=3) (class) [ #PIL.ImageFilter.ModeFilter-class# ]

Mode filter.

For more information about this class, see #PIL.ImageFilter.ModeFilter-classThe ModeFilter Class .


RankFilter(size, rank) (class) [ #PIL.ImageFilter.RankFilter-class# ]

Rank filter.

For more information about this class, see #PIL.ImageFilter.RankFilter-classThe RankFilter Class .


SHARPEN (class)  [ #PIL.ImageFilter.SHARPEN-class# ]

Sharpening filter.

For more information about this class, see #PIL.ImageFilter.SHARPEN-classThe SHARPEN Class .


SMOOTH (class)  [ #PIL.ImageFilter.SMOOTH-class# ]

Smoothing filter.

For more information about this class, see #PIL.ImageFilter.SMOOTH-classThe SMOOTH Class .


SMOOTH_MORE (class)  [ #PIL.ImageFilter.SMOOTH_MORE-class# ]

Stronger smoothing filter.

For more information about this class, see #PIL.ImageFilter.SMOOTH_MORE-classThe SMOOTH_MORE Class .



The BLUR Class 


BLUR (class)  [ #PIL.ImageFilter.BLUR-class# ]

Blur filter.



The CONTOUR Class 


CONTOUR (class)  [ #PIL.ImageFilter.CONTOUR-class# ]

Contour filter.



The DETAIL Class 


DETAIL (class)  [ #PIL.ImageFilter.DETAIL-class# ]

Detail filter.



The EDGE_ENHANCE Class 


EDGE_ENHANCE (class)  [ #PIL.ImageFilter.EDGE_ENHANCE-class# ]

Edge enhancement filter.



The EDGE_ENHANCE_MORE Class 


EDGE_ENHANCE_MORE (class)  [ #PIL.ImageFilter.EDGE_ENHANCE_MORE-class# ]

Stronger edge enhancement filter.



The EMBOSS Class 


EMBOSS (class)  [ #PIL.ImageFilter.EMBOSS-class# ]

Embossing filter.



The FIND_EDGES Class 


FIND_EDGES (class)  [ #PIL.ImageFilter.FIND_EDGES-class# ]

Edge-finding filter.



The Kernel Class 


Kernel(size, kernel, **options) (class) [ #PIL.ImageFilter.Kernel-class# ]

Convolution filter kernel.


__init__(size, kernel, **options)  [ #PIL.ImageFilter.Kernel.__init__-method# ]

Create a convolution kernel.  The current version only
supports 3x3 and 5x5 integer and floating point kernels.

In the current version, kernels can only be applied to
"L" and "RGB" images.


size

Kernel size, given as (width, height).  In
   the current version, this must be (3,3) or (5,5).

kernel

A sequence containing kernel weights.

**options

Optional keyword arguments.

scale=

Scale factor.  If given, the result for each
   pixel is divided by this value.  The default is the sum
   of the kernel weights.

offset=

Offset.  If given, this value is added to the
   result, after it has been divided by the scale factor.




The MaxFilter Class 


MaxFilter(size=3) (class) [ #PIL.ImageFilter.MaxFilter-class# ]

Max filter.  Picks the largest pixel value in a window with the
given size.


__init__(size=3)  [ #PIL.ImageFilter.MaxFilter.__init__-method# ]

Create a max filter.


size

The kernel size, in pixels.




The MedianFilter Class 


MedianFilter(size=3) (class) [ #PIL.ImageFilter.MedianFilter-class# ]

Median filter.  Picks the median pixel value in a window with the
given size.


__init__(size=3)  [ #PIL.ImageFilter.MedianFilter.__init__-method# ]

Create a median filter.


size

The kernel size, in pixels.




The MinFilter Class 


MinFilter(size=3) (class) [ #PIL.ImageFilter.MinFilter-class# ]

Min filter.  Picks the lowest pixel value in a window with the given
size.


__init__(size=3)  [ #PIL.ImageFilter.MinFilter.__init__-method# ]

Create a min filter.


size

The kernel size, in pixels.




The ModeFilter Class 


ModeFilter(size=3) (class) [ #PIL.ImageFilter.ModeFilter-class# ]

Mode filter.  Picks the most frequent pixel value in a box with the
given size.  Pixel values that occur only once or twice are ignored;
if no pixel value occurs more than twice, the original pixel value
is preserved.


__init__(size=3)  [ #PIL.ImageFilter.ModeFilter.__init__-method# ]

Create a mode filter.


size

The kernel size, in pixels.




The RankFilter Class 


RankFilter(size, rank) (class) [ #PIL.ImageFilter.RankFilter-class# ]

Rank filter.


__init__(size, rank)  [ #PIL.ImageFilter.RankFilter.__init__-method# ]

Create a rank filter.  The rank filter sorts all pixels in
a window of the given size, and returns the rank'th value.


size

The kernel size, in pixels.

rank

What pixel value to pick.  Use 0 for a min filter,
   size*size/2 for a median filter, size*size-1 for a max filter,
   etc.




The SHARPEN Class 


SHARPEN (class)  [ #PIL.ImageFilter.SHARPEN-class# ]

Sharpening filter.



The SMOOTH Class 


SMOOTH (class)  [ #PIL.ImageFilter.SMOOTH-class# ]

Smoothing filter.



The SMOOTH_MORE Class 


SMOOTH_MORE (class)  [ #PIL.ImageFilter.SMOOTH_MORE-class# ]

Stronger smoothing filter.




