~ubuntu-branches/debian/squeeze/python-imaging/squeeze

« back to all changes in this revision

Viewing changes to Docs/pythondoc-PIL.ImageFilter.html

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2006-08-28 23:14:10 UTC
  • mfrom: (2.1.5 edgy)
  • Revision ID: james.westby@ubuntu.com-20060828231410-lca9enmne3ecmkup
Tags: 1.1.5-11
* python-imaging-sane: Depend on python-numarray. Closes: #382190.
* Add dependencies on ${shlibs:Depends}, lost in -6. Closes: #378596.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
 
2
<html>
 
3
<head>
 
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' />
 
7
</head>
 
8
<body>
 
9
<h1>The PIL.ImageFilter Module</h1>
 
10
<dl>
 
11
<dt><b>BLUR</b> (class)  [<a href='#PIL.ImageFilter.BLUR-class'>#</a>]</dt>
 
12
<dd>
 
13
<p>Blur filter.</p>
 
14
<p>For more information about this class, see <a href='#PIL.ImageFilter.BLUR-class'><i>The BLUR Class</i></a>.</p>
 
15
</dd>
 
16
<dt><b>CONTOUR</b> (class)  [<a href='#PIL.ImageFilter.CONTOUR-class'>#</a>]</dt>
 
17
<dd>
 
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>
 
20
</dd>
 
21
<dt><b>DETAIL</b> (class)  [<a href='#PIL.ImageFilter.DETAIL-class'>#</a>]</dt>
 
22
<dd>
 
23
<p>Detail filter.</p>
 
24
<p>For more information about this class, see <a href='#PIL.ImageFilter.DETAIL-class'><i>The DETAIL Class</i></a>.</p>
 
25
</dd>
 
26
<dt><b>EDGE_ENHANCE</b> (class)  [<a href='#PIL.ImageFilter.EDGE_ENHANCE-class'>#</a>]</dt>
 
27
<dd>
 
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>
 
30
</dd>
 
31
<dt><b>EDGE_ENHANCE_MORE</b> (class)  [<a href='#PIL.ImageFilter.EDGE_ENHANCE_MORE-class'>#</a>]</dt>
 
32
<dd>
 
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>
 
35
</dd>
 
36
<dt><b>EMBOSS</b> (class)  [<a href='#PIL.ImageFilter.EMBOSS-class'>#</a>]</dt>
 
37
<dd>
 
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>
 
40
</dd>
 
41
<dt><b>FIND_EDGES</b> (class)  [<a href='#PIL.ImageFilter.FIND_EDGES-class'>#</a>]</dt>
 
42
<dd>
 
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>
 
45
</dd>
 
46
<dt><b>Kernel(size, kernel, **options)</b> (class) [<a href='#PIL.ImageFilter.Kernel-class'>#</a>]</dt>
 
47
<dd>
 
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>
 
50
</dd>
 
51
<dt><b>MaxFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MaxFilter-class'>#</a>]</dt>
 
52
<dd>
 
53
<p>Max filter.</p>
 
54
<p>For more information about this class, see <a href='#PIL.ImageFilter.MaxFilter-class'><i>The MaxFilter Class</i></a>.</p>
 
55
</dd>
 
56
<dt><b>MedianFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MedianFilter-class'>#</a>]</dt>
 
57
<dd>
 
58
<p>Median filter.</p>
 
59
<p>For more information about this class, see <a href='#PIL.ImageFilter.MedianFilter-class'><i>The MedianFilter Class</i></a>.</p>
 
60
</dd>
 
61
<dt><b>MinFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MinFilter-class'>#</a>]</dt>
 
62
<dd>
 
63
<p>Min filter.</p>
 
64
<p>For more information about this class, see <a href='#PIL.ImageFilter.MinFilter-class'><i>The MinFilter Class</i></a>.</p>
 
65
</dd>
 
66
<dt><b>ModeFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.ModeFilter-class'>#</a>]</dt>
 
67
<dd>
 
68
<p>Mode filter.</p>
 
69
<p>For more information about this class, see <a href='#PIL.ImageFilter.ModeFilter-class'><i>The ModeFilter Class</i></a>.</p>
 
70
</dd>
 
71
<dt><b>RankFilter(size, rank)</b> (class) [<a href='#PIL.ImageFilter.RankFilter-class'>#</a>]</dt>
 
72
<dd>
 
73
<p>Rank filter.</p>
 
74
<p>For more information about this class, see <a href='#PIL.ImageFilter.RankFilter-class'><i>The RankFilter Class</i></a>.</p>
 
75
</dd>
 
76
<dt><b>SHARPEN</b> (class)  [<a href='#PIL.ImageFilter.SHARPEN-class'>#</a>]</dt>
 
77
<dd>
 
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>
 
80
</dd>
 
81
<dt><b>SMOOTH</b> (class)  [<a href='#PIL.ImageFilter.SMOOTH-class'>#</a>]</dt>
 
82
<dd>
 
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>
 
85
</dd>
 
86
<dt><b>SMOOTH_MORE</b> (class)  [<a href='#PIL.ImageFilter.SMOOTH_MORE-class'>#</a>]</dt>
 
87
<dd>
 
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>
 
90
</dd>
 
91
</dl>
 
92
<h2><a id='PIL.ImageFilter.BLUR-class' name='PIL.ImageFilter.BLUR-class'>The BLUR Class</a></h2>
 
93
<dl>
 
94
<dt><b>BLUR</b> (class)  [<a href='#PIL.ImageFilter.BLUR-class'>#</a>]</dt>
 
95
<dd>
 
96
<p>Blur filter.</p>
 
97
</dd>
 
98
</dl>
 
99
<h2><a id='PIL.ImageFilter.CONTOUR-class' name='PIL.ImageFilter.CONTOUR-class'>The CONTOUR Class</a></h2>
 
100
<dl>
 
101
<dt><b>CONTOUR</b> (class)  [<a href='#PIL.ImageFilter.CONTOUR-class'>#</a>]</dt>
 
102
<dd>
 
103
<p>Contour filter.</p>
 
104
</dd>
 
105
</dl>
 
106
<h2><a id='PIL.ImageFilter.DETAIL-class' name='PIL.ImageFilter.DETAIL-class'>The DETAIL Class</a></h2>
 
107
<dl>
 
108
<dt><b>DETAIL</b> (class)  [<a href='#PIL.ImageFilter.DETAIL-class'>#</a>]</dt>
 
109
<dd>
 
110
<p>Detail filter.</p>
 
111
</dd>
 
112
</dl>
 
113
<h2><a id='PIL.ImageFilter.EDGE_ENHANCE-class' name='PIL.ImageFilter.EDGE_ENHANCE-class'>The EDGE_ENHANCE Class</a></h2>
 
114
<dl>
 
115
<dt><b>EDGE_ENHANCE</b> (class)  [<a href='#PIL.ImageFilter.EDGE_ENHANCE-class'>#</a>]</dt>
 
116
<dd>
 
117
<p>Edge enhancement filter.</p>
 
118
</dd>
 
119
</dl>
 
120
<h2><a id='PIL.ImageFilter.EDGE_ENHANCE_MORE-class' name='PIL.ImageFilter.EDGE_ENHANCE_MORE-class'>The EDGE_ENHANCE_MORE Class</a></h2>
 
121
<dl>
 
122
<dt><b>EDGE_ENHANCE_MORE</b> (class)  [<a href='#PIL.ImageFilter.EDGE_ENHANCE_MORE-class'>#</a>]</dt>
 
123
<dd>
 
124
<p>Stronger edge enhancement filter.</p>
 
125
</dd>
 
126
</dl>
 
127
<h2><a id='PIL.ImageFilter.EMBOSS-class' name='PIL.ImageFilter.EMBOSS-class'>The EMBOSS Class</a></h2>
 
128
<dl>
 
129
<dt><b>EMBOSS</b> (class)  [<a href='#PIL.ImageFilter.EMBOSS-class'>#</a>]</dt>
 
130
<dd>
 
131
<p>Embossing filter.</p>
 
132
</dd>
 
133
</dl>
 
134
<h2><a id='PIL.ImageFilter.FIND_EDGES-class' name='PIL.ImageFilter.FIND_EDGES-class'>The FIND_EDGES Class</a></h2>
 
135
<dl>
 
136
<dt><b>FIND_EDGES</b> (class)  [<a href='#PIL.ImageFilter.FIND_EDGES-class'>#</a>]</dt>
 
137
<dd>
 
138
<p>Edge-finding filter.</p>
 
139
</dd>
 
140
</dl>
 
141
<h2><a id='PIL.ImageFilter.Kernel-class' name='PIL.ImageFilter.Kernel-class'>The Kernel Class</a></h2>
 
142
<dl>
 
143
<dt><b>Kernel(size, kernel, **options)</b> (class) [<a href='#PIL.ImageFilter.Kernel-class'>#</a>]</dt>
 
144
<dd>
 
145
<p>Convolution filter kernel.</p>
 
146
</dd>
 
147
<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>
 
148
<dd>
 
149
<p>Create a convolution kernel.  The current version only
 
150
supports 3x3 and 5x5 integer and floating point kernels.
 
151
</p><p>
 
152
In the current version, kernels can only be applied to
 
153
"L" and "RGB" images.
 
154
 
 
155
</p><dl>
 
156
<dt><i>size</i></dt>
 
157
<dd>
 
158
Kernel size, given as (width, height).  In
 
159
   the current version, this must be (3,3) or (5,5).</dd>
 
160
<dt><i>kernel</i></dt>
 
161
<dd>
 
162
A sequence containing kernel weights.</dd>
 
163
<dt><i>**options</i></dt>
 
164
<dd>
 
165
Optional keyword arguments.</dd>
 
166
<dt><i>scale=</i></dt>
 
167
<dd>
 
168
Scale factor.  If given, the result for each
 
169
   pixel is divided by this value.  The default is the sum
 
170
   of the kernel weights.</dd>
 
171
<dt><i>offset=</i></dt>
 
172
<dd>
 
173
Offset.  If given, this value is added to the
 
174
   result, after it has been divided by the scale factor.</dd>
 
175
</dl><br />
 
176
</dd>
 
177
</dl>
 
178
<h2><a id='PIL.ImageFilter.MaxFilter-class' name='PIL.ImageFilter.MaxFilter-class'>The MaxFilter Class</a></h2>
 
179
<dl>
 
180
<dt><b>MaxFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MaxFilter-class'>#</a>]</dt>
 
181
<dd>
 
182
<p>Max filter.  Picks the largest pixel value in a window with the
 
183
given size.</p>
 
184
</dd>
 
185
<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>
 
186
<dd>
 
187
<p>Create a max filter.</p>
 
188
<dl>
 
189
<dt><i>size</i></dt>
 
190
<dd>
 
191
The kernel size, in pixels.</dd>
 
192
</dl><br />
 
193
</dd>
 
194
</dl>
 
195
<h2><a id='PIL.ImageFilter.MedianFilter-class' name='PIL.ImageFilter.MedianFilter-class'>The MedianFilter Class</a></h2>
 
196
<dl>
 
197
<dt><b>MedianFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MedianFilter-class'>#</a>]</dt>
 
198
<dd>
 
199
<p>Median filter.  Picks the median pixel value in a window with the
 
200
given size.</p>
 
201
</dd>
 
202
<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>
 
203
<dd>
 
204
<p>Create a median filter.</p>
 
205
<dl>
 
206
<dt><i>size</i></dt>
 
207
<dd>
 
208
The kernel size, in pixels.</dd>
 
209
</dl><br />
 
210
</dd>
 
211
</dl>
 
212
<h2><a id='PIL.ImageFilter.MinFilter-class' name='PIL.ImageFilter.MinFilter-class'>The MinFilter Class</a></h2>
 
213
<dl>
 
214
<dt><b>MinFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.MinFilter-class'>#</a>]</dt>
 
215
<dd>
 
216
<p>Min filter.  Picks the lowest pixel value in a window with the given
 
217
size.</p>
 
218
</dd>
 
219
<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>
 
220
<dd>
 
221
<p>Create a min filter.</p>
 
222
<dl>
 
223
<dt><i>size</i></dt>
 
224
<dd>
 
225
The kernel size, in pixels.</dd>
 
226
</dl><br />
 
227
</dd>
 
228
</dl>
 
229
<h2><a id='PIL.ImageFilter.ModeFilter-class' name='PIL.ImageFilter.ModeFilter-class'>The ModeFilter Class</a></h2>
 
230
<dl>
 
231
<dt><b>ModeFilter(size=3)</b> (class) [<a href='#PIL.ImageFilter.ModeFilter-class'>#</a>]</dt>
 
232
<dd>
 
233
<p>Mode filter.  Picks the most frequent pixel value in a box with the
 
234
given size.  Pixel values that occur only once or twice are ignored;
 
235
if no pixel value occurs more than twice, the original pixel value
 
236
is preserved.</p>
 
237
</dd>
 
238
<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>
 
239
<dd>
 
240
<p>Create a mode filter.</p>
 
241
<dl>
 
242
<dt><i>size</i></dt>
 
243
<dd>
 
244
The kernel size, in pixels.</dd>
 
245
</dl><br />
 
246
</dd>
 
247
</dl>
 
248
<h2><a id='PIL.ImageFilter.RankFilter-class' name='PIL.ImageFilter.RankFilter-class'>The RankFilter Class</a></h2>
 
249
<dl>
 
250
<dt><b>RankFilter(size, rank)</b> (class) [<a href='#PIL.ImageFilter.RankFilter-class'>#</a>]</dt>
 
251
<dd>
 
252
<p>Rank filter.</p>
 
253
</dd>
 
254
<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>
 
255
<dd>
 
256
<p>Create a rank filter.  The rank filter sorts all pixels in
 
257
a window of the given size, and returns the rank'th value.</p>
 
258
<dl>
 
259
<dt><i>size</i></dt>
 
260
<dd>
 
261
The kernel size, in pixels.</dd>
 
262
<dt><i>rank</i></dt>
 
263
<dd>
 
264
What pixel value to pick.  Use 0 for a min filter,
 
265
   size*size/2 for a median filter, size*size-1 for a max filter,
 
266
   etc.</dd>
 
267
</dl><br />
 
268
</dd>
 
269
</dl>
 
270
<h2><a id='PIL.ImageFilter.SHARPEN-class' name='PIL.ImageFilter.SHARPEN-class'>The SHARPEN Class</a></h2>
 
271
<dl>
 
272
<dt><b>SHARPEN</b> (class)  [<a href='#PIL.ImageFilter.SHARPEN-class'>#</a>]</dt>
 
273
<dd>
 
274
<p>Sharpening filter.</p>
 
275
</dd>
 
276
</dl>
 
277
<h2><a id='PIL.ImageFilter.SMOOTH-class' name='PIL.ImageFilter.SMOOTH-class'>The SMOOTH Class</a></h2>
 
278
<dl>
 
279
<dt><b>SMOOTH</b> (class)  [<a href='#PIL.ImageFilter.SMOOTH-class'>#</a>]</dt>
 
280
<dd>
 
281
<p>Smoothing filter.</p>
 
282
</dd>
 
283
</dl>
 
284
<h2><a id='PIL.ImageFilter.SMOOTH_MORE-class' name='PIL.ImageFilter.SMOOTH_MORE-class'>The SMOOTH_MORE Class</a></h2>
 
285
<dl>
 
286
<dt><b>SMOOTH_MORE</b> (class)  [<a href='#PIL.ImageFilter.SMOOTH_MORE-class'>#</a>]</dt>
 
287
<dd>
 
288
<p>Stronger smoothing filter.</p>
 
289
</dd>
 
290
</dl>
 
291
</body></html>