1
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4
<meta http-equiv='Content-Type' content='text/html; charset=us-ascii' />
5
<title>The PIL.ImageFilter Module</title>
6
<link rel='stylesheet' href='effbot.css' type='text/css' />
9
<h1>The PIL.ImageFilter Module</h1>
11
<dt><b>BLUR</b> (class) [<a href='#PIL.ImageFilter.BLUR-class'>#</a>]</dt>
14
<p>For more information about this class, see <a href='#PIL.ImageFilter.BLUR-class'><i>The BLUR Class</i></a>.</p>
16
<dt><b>CONTOUR</b> (class) [<a href='#PIL.ImageFilter.CONTOUR-class'>#</a>]</dt>
18
<p>Contour filter.</p>
19
<p>For more information about this class, see <a href='#PIL.ImageFilter.CONTOUR-class'><i>The CONTOUR Class</i></a>.</p>
21
<dt><b>DETAIL</b> (class) [<a href='#PIL.ImageFilter.DETAIL-class'>#</a>]</dt>
24
<p>For more information about this class, see <a href='#PIL.ImageFilter.DETAIL-class'><i>The DETAIL Class</i></a>.</p>
26
<dt><b>EDGE_ENHANCE</b> (class) [<a href='#PIL.ImageFilter.EDGE_ENHANCE-class'>#</a>]</dt>
28
<p>Edge enhancement filter.</p>
29
<p>For more information about this class, see <a href='#PIL.ImageFilter.EDGE_ENHANCE-class'><i>The EDGE_ENHANCE Class</i></a>.</p>
31
<dt><b>EDGE_ENHANCE_MORE</b> (class) [<a href='#PIL.ImageFilter.EDGE_ENHANCE_MORE-class'>#</a>]</dt>
33
<p>Stronger edge enhancement filter.</p>
34
<p>For more information about this class, see <a href='#PIL.ImageFilter.EDGE_ENHANCE_MORE-class'><i>The EDGE_ENHANCE_MORE Class</i></a>.</p>
36
<dt><b>EMBOSS</b> (class) [<a href='#PIL.ImageFilter.EMBOSS-class'>#</a>]</dt>
38
<p>Embossing filter.</p>
39
<p>For more information about this class, see <a href='#PIL.ImageFilter.EMBOSS-class'><i>The EMBOSS Class</i></a>.</p>
41
<dt><b>FIND_EDGES</b> (class) [<a href='#PIL.ImageFilter.FIND_EDGES-class'>#</a>]</dt>
43
<p>Edge-finding filter.</p>
44
<p>For more information about this class, see <a href='#PIL.ImageFilter.FIND_EDGES-class'><i>The FIND_EDGES Class</i></a>.</p>
46
<dt><b>Kernel(size, kernel, **options)</b> (class) [<a href='#PIL.ImageFilter.Kernel-class'>#</a>]</dt>
48
<p>Convolution filter kernel.</p>
49
<p>For more information about this class, see <a href='#PIL.ImageFilter.Kernel-class'><i>The Kernel Class</i></a>.</p>
51
<dt><b>MaxFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MaxFilter-class'>#</a>]</dt>
54
<p>For more information about this class, see <a href='#PIL.ImageFilter.MaxFilter-class'><i>The MaxFilter Class</i></a>.</p>
56
<dt><b>MedianFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MedianFilter-class'>#</a>]</dt>
59
<p>For more information about this class, see <a href='#PIL.ImageFilter.MedianFilter-class'><i>The MedianFilter Class</i></a>.</p>
61
<dt><b>MinFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MinFilter-class'>#</a>]</dt>
64
<p>For more information about this class, see <a href='#PIL.ImageFilter.MinFilter-class'><i>The MinFilter Class</i></a>.</p>
66
<dt><b>ModeFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.ModeFilter-class'>#</a>]</dt>
69
<p>For more information about this class, see <a href='#PIL.ImageFilter.ModeFilter-class'><i>The ModeFilter Class</i></a>.</p>
71
<dt><b>RankFilter(size, rank)</b> (class) [<a href='#PIL.ImageFilter.RankFilter-class'>#</a>]</dt>
74
<p>For more information about this class, see <a href='#PIL.ImageFilter.RankFilter-class'><i>The RankFilter Class</i></a>.</p>
76
<dt><b>SHARPEN</b> (class) [<a href='#PIL.ImageFilter.SHARPEN-class'>#</a>]</dt>
78
<p>Sharpening filter.</p>
79
<p>For more information about this class, see <a href='#PIL.ImageFilter.SHARPEN-class'><i>The SHARPEN Class</i></a>.</p>
81
<dt><b>SMOOTH</b> (class) [<a href='#PIL.ImageFilter.SMOOTH-class'>#</a>]</dt>
83
<p>Smoothing filter.</p>
84
<p>For more information about this class, see <a href='#PIL.ImageFilter.SMOOTH-class'><i>The SMOOTH Class</i></a>.</p>
86
<dt><b>SMOOTH_MORE</b> (class) [<a href='#PIL.ImageFilter.SMOOTH_MORE-class'>#</a>]</dt>
88
<p>Stronger smoothing filter.</p>
89
<p>For more information about this class, see <a href='#PIL.ImageFilter.SMOOTH_MORE-class'><i>The SMOOTH_MORE Class</i></a>.</p>
92
<h2><a id='PIL.ImageFilter.BLUR-class' name='PIL.ImageFilter.BLUR-class'>The BLUR Class</a></h2>
94
<dt><b>BLUR</b> (class) [<a href='#PIL.ImageFilter.BLUR-class'>#</a>]</dt>
98
<h2><a id='PIL.ImageFilter.CONTOUR-class' name='PIL.ImageFilter.CONTOUR-class'>The CONTOUR Class</a></h2>
100
<dt><b>CONTOUR</b> (class) [<a href='#PIL.ImageFilter.CONTOUR-class'>#</a>]</dt>
104
<h2><a id='PIL.ImageFilter.DETAIL-class' name='PIL.ImageFilter.DETAIL-class'>The DETAIL Class</a></h2>
106
<dt><b>DETAIL</b> (class) [<a href='#PIL.ImageFilter.DETAIL-class'>#</a>]</dt>
110
<h2><a id='PIL.ImageFilter.EDGE_ENHANCE-class' name='PIL.ImageFilter.EDGE_ENHANCE-class'>The EDGE_ENHANCE Class</a></h2>
112
<dt><b>EDGE_ENHANCE</b> (class) [<a href='#PIL.ImageFilter.EDGE_ENHANCE-class'>#</a>]</dt>
116
<h2><a id='PIL.ImageFilter.EDGE_ENHANCE_MORE-class' name='PIL.ImageFilter.EDGE_ENHANCE_MORE-class'>The EDGE_ENHANCE_MORE Class</a></h2>
118
<dt><b>EDGE_ENHANCE_MORE</b> (class) [<a href='#PIL.ImageFilter.EDGE_ENHANCE_MORE-class'>#</a>]</dt>
122
<h2><a id='PIL.ImageFilter.EMBOSS-class' name='PIL.ImageFilter.EMBOSS-class'>The EMBOSS Class</a></h2>
124
<dt><b>EMBOSS</b> (class) [<a href='#PIL.ImageFilter.EMBOSS-class'>#</a>]</dt>
128
<h2><a id='PIL.ImageFilter.FIND_EDGES-class' name='PIL.ImageFilter.FIND_EDGES-class'>The FIND_EDGES Class</a></h2>
130
<dt><b>FIND_EDGES</b> (class) [<a href='#PIL.ImageFilter.FIND_EDGES-class'>#</a>]</dt>
134
<h2><a id='PIL.ImageFilter.Kernel-class' name='PIL.ImageFilter.Kernel-class'>The Kernel Class</a></h2>
136
<dt><b>Kernel(size, kernel, **options)</b> (class) [<a href='#PIL.ImageFilter.Kernel-class'>#</a>]</dt>
139
<dt><a id='PIL.ImageFilter.Kernel.__init__-method' name='PIL.ImageFilter.Kernel.__init__-method'><b>__init__(size, kernel, **options)</b></a> [<a href='#PIL.ImageFilter.Kernel.__init__-method'>#</a>]</dt>
141
<p>Create a convolution kernel. The current version only
142
supports 3x3 and 5x5 integer and floating point kernels.
144
In the current version, kernels can only be applied to
145
"L" and "RGB" images.
151
<dt><i>kernel</i></dt>
154
<dt><i>**options</i></dt>
157
<dt><i>scale=</i></dt>
160
<dt><i>offset=</i></dt>
166
<h2><a id='PIL.ImageFilter.MaxFilter-class' name='PIL.ImageFilter.MaxFilter-class'>The MaxFilter Class</a></h2>
168
<dt><b>MaxFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MaxFilter-class'>#</a>]</dt>
171
<dt><a id='PIL.ImageFilter.MaxFilter.__init__-method' name='PIL.ImageFilter.MaxFilter.__init__-method'><b>__init__(size=3)</b></a> [<a href='#PIL.ImageFilter.MaxFilter.__init__-method'>#</a>]</dt>
180
<h2><a id='PIL.ImageFilter.MedianFilter-class' name='PIL.ImageFilter.MedianFilter-class'>The MedianFilter Class</a></h2>
182
<dt><b>MedianFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MedianFilter-class'>#</a>]</dt>
185
<dt><a id='PIL.ImageFilter.MedianFilter.__init__-method' name='PIL.ImageFilter.MedianFilter.__init__-method'><b>__init__(size=3)</b></a> [<a href='#PIL.ImageFilter.MedianFilter.__init__-method'>#</a>]</dt>
194
<h2><a id='PIL.ImageFilter.MinFilter-class' name='PIL.ImageFilter.MinFilter-class'>The MinFilter Class</a></h2>
196
<dt><b>MinFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MinFilter-class'>#</a>]</dt>
199
<dt><a id='PIL.ImageFilter.MinFilter.__init__-method' name='PIL.ImageFilter.MinFilter.__init__-method'><b>__init__(size=3)</b></a> [<a href='#PIL.ImageFilter.MinFilter.__init__-method'>#</a>]</dt>
208
<h2><a id='PIL.ImageFilter.ModeFilter-class' name='PIL.ImageFilter.ModeFilter-class'>The ModeFilter Class</a></h2>
210
<dt><b>ModeFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.ModeFilter-class'>#</a>]</dt>
213
<dt><a id='PIL.ImageFilter.ModeFilter.__init__-method' name='PIL.ImageFilter.ModeFilter.__init__-method'><b>__init__(size=3)</b></a> [<a href='#PIL.ImageFilter.ModeFilter.__init__-method'>#</a>]</dt>
222
<h2><a id='PIL.ImageFilter.RankFilter-class' name='PIL.ImageFilter.RankFilter-class'>The RankFilter Class</a></h2>
224
<dt><b>RankFilter(size, rank)</b> (class) [<a href='#PIL.ImageFilter.RankFilter-class'>#</a>]</dt>
227
<dt><a id='PIL.ImageFilter.RankFilter.__init__-method' name='PIL.ImageFilter.RankFilter.__init__-method'><b>__init__(size, rank)</b></a> [<a href='#PIL.ImageFilter.RankFilter.__init__-method'>#</a>]</dt>
239
<h2><a id='PIL.ImageFilter.SHARPEN-class' name='PIL.ImageFilter.SHARPEN-class'>The SHARPEN Class</a></h2>
241
<dt><b>SHARPEN</b> (class) [<a href='#PIL.ImageFilter.SHARPEN-class'>#</a>]</dt>
245
<h2><a id='PIL.ImageFilter.SMOOTH-class' name='PIL.ImageFilter.SMOOTH-class'>The SMOOTH Class</a></h2>
247
<dt><b>SMOOTH</b> (class) [<a href='#PIL.ImageFilter.SMOOTH-class'>#</a>]</dt>
251
<h2><a id='PIL.ImageFilter.SMOOTH_MORE-class' name='PIL.ImageFilter.SMOOTH_MORE-class'>The SMOOTH_MORE Class</a></h2>
253
<dt><b>SMOOTH_MORE</b> (class) [<a href='#PIL.ImageFilter.SMOOTH_MORE-class'>#</a>]</dt>