~edwin-grubbs/python-imaging/trunk

« back to all changes in this revision

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

  • Committer: effbot
  • Date: 2006-07-05 20:36:11 UTC
  • Revision ID: svn-v4:be285980-f00d-0410-a9fe-d4747b46ecd0:pil:348
Load Imaging-1.1.6b1 into pil.

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.ImageChops Module</title>
6
 
<link rel='stylesheet' href='effbot.css' type='text/css' />
7
 
</head>
8
 
<body>
9
 
<h1>The PIL.ImageChops Module</h1>
10
 
<p>The <b>ImageChops</b> module contains a number of arithmetical image
11
 
operations, called <i>channel operations</i> ("chops"). These can be
12
 
used for various purposes, including special effects, image
13
 
compositions, algorithmic painting, and more.
14
 
</p><p>
15
 
At this time, channel operations are only implemented for 8-bit
16
 
images (e.g. "L" and "RGB").
17
 
</p><p>
18
 
Most channel operations take one or two image arguments and returns
19
 
a new image.  Unless otherwise noted, the result of a channel
20
 
operation is always clipped to the range 0 to MAX (which is 255 for
21
 
all modes supported by the operations in this module).
22
 
</p><h2>Module Contents</h2>
23
 
<dl>
24
 
<dt><a id='PIL.ImageChops.add-function' name='PIL.ImageChops.add-function'><b>add(image1, image2, scale=1.0, offset=0)</b></a> [<a href='#PIL.ImageChops.add-function'>#</a>]</dt>
25
 
<dd>
26
 
<p>Add images
27
 
((image1 + image2) / scale + offset).
28
 
</p><p>
29
 
Adds two images, dividing the result by scale and adding the
30
 
offset. If omitted, scale defaults to 1.0, and offset to 0.0.
31
 
 
32
 
</p><dl>
33
 
<dt><i>image1</i></dt>
34
 
<dd>
35
 
First image.</dd>
36
 
<dt><i>image1</i></dt>
37
 
<dd>
38
 
Second image.</dd>
39
 
<dt>Returns:</dt>
40
 
<dd>
41
 
An image object.</dd>
42
 
</dl><br />
43
 
</dd>
44
 
<dt><a id='PIL.ImageChops.add_modulo-function' name='PIL.ImageChops.add_modulo-function'><b>add_modulo(image1, image2)</b></a> [<a href='#PIL.ImageChops.add_modulo-function'>#</a>]</dt>
45
 
<dd>
46
 
<p>Add images without clipping
47
 
((image1 + image2) % MAX).
48
 
</p><p>
49
 
Adds two images, without clipping the result.
50
 
 
51
 
</p><dl>
52
 
<dt><i>image1</i></dt>
53
 
<dd>
54
 
First image.</dd>
55
 
<dt><i>image1</i></dt>
56
 
<dd>
57
 
Second image.</dd>
58
 
<dt>Returns:</dt>
59
 
<dd>
60
 
An image object.</dd>
61
 
</dl><br />
62
 
</dd>
63
 
<dt><a id='PIL.ImageChops.blend-function' name='PIL.ImageChops.blend-function'><b>blend(image1, image2, alpha)</b></a> [<a href='#PIL.ImageChops.blend-function'>#</a>]</dt>
64
 
<dd>
65
 
<p>Blend images using constant transparency weight.
66
 
</p><p>
67
 
Same as the <b>blend</b> function in the <b>Image</b> module.
68
 
</p></dd>
69
 
<dt><a id='PIL.ImageChops.composite-function' name='PIL.ImageChops.composite-function'><b>composite(image1, image2, mask)</b></a> [<a href='#PIL.ImageChops.composite-function'>#</a>]</dt>
70
 
<dd>
71
 
<p>Create composite using transparency mask.
72
 
</p><p>
73
 
Same as the <b>composite</b> function in the <b>Image</b> module.
74
 
</p></dd>
75
 
<dt><a id='PIL.ImageChops.constant-function' name='PIL.ImageChops.constant-function'><b>constant(image, value)</b></a> [<a href='#PIL.ImageChops.constant-function'>#</a>]</dt>
76
 
<dd>
77
 
<p>Return an image with the same size as the given image, but filled
78
 
with the given pixel value.</p>
79
 
<dl>
80
 
<dt><i>image</i></dt>
81
 
<dd>
82
 
Reference image.</dd>
83
 
<dt><i>value</i></dt>
84
 
<dd>
85
 
Pixel value.</dd>
86
 
<dt>Returns:</dt>
87
 
<dd>
88
 
An image object.</dd>
89
 
</dl><br />
90
 
</dd>
91
 
<dt><a id='PIL.ImageChops.darker-function' name='PIL.ImageChops.darker-function'><b>darker(image1, image2)</b></a> [<a href='#PIL.ImageChops.darker-function'>#</a>]</dt>
92
 
<dd>
93
 
<p>Compare images, and return darker pixel value
94
 
(min(image1, image2)).
95
 
</p><p>
96
 
Compares the two images, pixel by pixel, and returns a new image
97
 
containing the darker values.
98
 
 
99
 
</p><dl>
100
 
<dt><i>image1</i></dt>
101
 
<dd>
102
 
First image.</dd>
103
 
<dt><i>image1</i></dt>
104
 
<dd>
105
 
Second image.</dd>
106
 
<dt>Returns:</dt>
107
 
<dd>
108
 
An image object.</dd>
109
 
</dl><br />
110
 
</dd>
111
 
<dt><a id='PIL.ImageChops.difference-function' name='PIL.ImageChops.difference-function'><b>difference(image1, image2)</b></a> [<a href='#PIL.ImageChops.difference-function'>#</a>]</dt>
112
 
<dd>
113
 
<p>Calculate absolute difference
114
 
(abs(image1 - image2)).
115
 
</p><p>
116
 
Returns the absolute value of the difference between the two images.
117
 
 
118
 
</p><dl>
119
 
<dt><i>image1</i></dt>
120
 
<dd>
121
 
First image.</dd>
122
 
<dt><i>image1</i></dt>
123
 
<dd>
124
 
Second image.</dd>
125
 
<dt>Returns:</dt>
126
 
<dd>
127
 
An image object.</dd>
128
 
</dl><br />
129
 
</dd>
130
 
<dt><a id='PIL.ImageChops.duplicate-function' name='PIL.ImageChops.duplicate-function'><b>duplicate(image)</b></a> [<a href='#PIL.ImageChops.duplicate-function'>#</a>]</dt>
131
 
<dd>
132
 
<p>Copy image.</p>
133
 
<dl>
134
 
<dt><i>image</i></dt>
135
 
<dd>
136
 
Source image.</dd>
137
 
<dt>Returns:</dt>
138
 
<dd>
139
 
A copy of the source image.</dd>
140
 
</dl><br />
141
 
</dd>
142
 
<dt><a id='PIL.ImageChops.invert-function' name='PIL.ImageChops.invert-function'><b>invert(image)</b></a> [<a href='#PIL.ImageChops.invert-function'>#</a>]</dt>
143
 
<dd>
144
 
<p>Inverts an image
145
 
(MAX - image).</p>
146
 
<dl>
147
 
<dt><i>image</i></dt>
148
 
<dd>
149
 
Source image.</dd>
150
 
<dt>Returns:</dt>
151
 
<dd>
152
 
An image object.</dd>
153
 
</dl><br />
154
 
</dd>
155
 
<dt><a id='PIL.ImageChops.lighter-function' name='PIL.ImageChops.lighter-function'><b>lighter(image1, image2)</b></a> [<a href='#PIL.ImageChops.lighter-function'>#</a>]</dt>
156
 
<dd>
157
 
<p>Compare images, and return lighter pixel value
158
 
(max(image1, image2)).
159
 
</p><p>
160
 
Compares the two images, pixel by pixel, and returns a new image
161
 
containing the lighter values.
162
 
 
163
 
</p><dl>
164
 
<dt><i>image1</i></dt>
165
 
<dd>
166
 
First image.</dd>
167
 
<dt><i>image1</i></dt>
168
 
<dd>
169
 
Second image.</dd>
170
 
<dt>Returns:</dt>
171
 
<dd>
172
 
An image object.</dd>
173
 
</dl><br />
174
 
</dd>
175
 
<dt><a id='PIL.ImageChops.logical_and-function' name='PIL.ImageChops.logical_and-function'><b>logical_and(image1, image2)</b></a> [<a href='#PIL.ImageChops.logical_and-function'>#</a>]</dt>
176
 
<dd>
177
 
<p>Logical AND
178
 
(image1 and image2).</p>
179
 
</dd>
180
 
<dt><a id='PIL.ImageChops.logical_or-function' name='PIL.ImageChops.logical_or-function'><b>logical_or(image1, image2)</b></a> [<a href='#PIL.ImageChops.logical_or-function'>#</a>]</dt>
181
 
<dd>
182
 
<p>Logical OR
183
 
(image1 or image2).</p>
184
 
</dd>
185
 
<dt><a id='PIL.ImageChops.logical_xor-function' name='PIL.ImageChops.logical_xor-function'><b>logical_xor(image1, image2)</b></a> [<a href='#PIL.ImageChops.logical_xor-function'>#</a>]</dt>
186
 
<dd>
187
 
<p>Logical XOR
188
 
(image1 xor image2).</p>
189
 
</dd>
190
 
<dt><a id='PIL.ImageChops.multiply-function' name='PIL.ImageChops.multiply-function'><b>multiply(image1, image2)</b></a> [<a href='#PIL.ImageChops.multiply-function'>#</a>]</dt>
191
 
<dd>
192
 
<p>Superimpose positive images
193
 
(image1 * image2 / MAX).
194
 
</p><p>
195
 
Superimposes two images on top of each other. If you multiply an
196
 
image with a solid black image, the result is black. If you multiply
197
 
with a solid white image, the image is unaffected.
198
 
 
199
 
</p><dl>
200
 
<dt><i>image1</i></dt>
201
 
<dd>
202
 
First image.</dd>
203
 
<dt><i>image1</i></dt>
204
 
<dd>
205
 
Second image.</dd>
206
 
<dt>Returns:</dt>
207
 
<dd>
208
 
An image object.</dd>
209
 
</dl><br />
210
 
</dd>
211
 
<dt><a id='PIL.ImageChops.offset-function' name='PIL.ImageChops.offset-function'><b>offset(image, xoffset, yoffset=None)</b></a> [<a href='#PIL.ImageChops.offset-function'>#</a>]</dt>
212
 
<dd>
213
 
<p>Offset image data.
214
 
</p><p>
215
 
Returns a copy of the image where data has been offset by the given
216
 
distances.  Data wraps around the edges.  If yoffset is omitted, it
217
 
is assumed to be equal to xoffset.
218
 
 
219
 
</p><dl>
220
 
<dt><i>image</i></dt>
221
 
<dd>
222
 
Source image.</dd>
223
 
<dt><i>xoffset</i></dt>
224
 
<dd>
225
 
The horizontal distance.</dd>
226
 
<dt><i>yoffset</i></dt>
227
 
<dd>
228
 
The vertical distance.  If omitted, both
229
 
   distances are set to the same value.</dd>
230
 
<dt>Returns:</dt>
231
 
<dd>
232
 
An Image object.</dd>
233
 
</dl><br />
234
 
</dd>
235
 
<dt><a id='PIL.ImageChops.screen-function' name='PIL.ImageChops.screen-function'><b>screen(image1, image2)</b></a> [<a href='#PIL.ImageChops.screen-function'>#</a>]</dt>
236
 
<dd>
237
 
<p>Superimpose negative images
238
 
(MAX - ((MAX - image1) * (MAX - image2) / MAX)).
239
 
</p><p>
240
 
Superimposes two inverted images on top of each other.
241
 
 
242
 
</p><dl>
243
 
<dt><i>image1</i></dt>
244
 
<dd>
245
 
First image.</dd>
246
 
<dt><i>image1</i></dt>
247
 
<dd>
248
 
Second image.</dd>
249
 
<dt>Returns:</dt>
250
 
<dd>
251
 
An image object.</dd>
252
 
</dl><br />
253
 
</dd>
254
 
<dt><a id='PIL.ImageChops.subtract-function' name='PIL.ImageChops.subtract-function'><b>subtract(image1, image2, scale=1.0, offset=0)</b></a> [<a href='#PIL.ImageChops.subtract-function'>#</a>]</dt>
255
 
<dd>
256
 
<p>Subtract images
257
 
((image1 - image2) / scale + offset).
258
 
</p><p>
259
 
Subtracts two images, dividing the result by scale and adding the
260
 
offset. If omitted, scale defaults to 1.0, and offset to 0.0.
261
 
 
262
 
</p><dl>
263
 
<dt><i>image1</i></dt>
264
 
<dd>
265
 
First image.</dd>
266
 
<dt><i>image1</i></dt>
267
 
<dd>
268
 
Second image.</dd>
269
 
<dt>Returns:</dt>
270
 
<dd>
271
 
An image object.</dd>
272
 
</dl><br />
273
 
</dd>
274
 
<dt><a id='PIL.ImageChops.subtract_modulo-function' name='PIL.ImageChops.subtract_modulo-function'><b>subtract_modulo(image1, image2)</b></a> [<a href='#PIL.ImageChops.subtract_modulo-function'>#</a>]</dt>
275
 
<dd>
276
 
<p>Subtract images without clipping
277
 
((image1 - image2) % MAX).
278
 
</p><p>
279
 
Subtracts two images, without clipping the result.
280
 
 
281
 
</p><dl>
282
 
<dt><i>image1</i></dt>
283
 
<dd>
284
 
First image.</dd>
285
 
<dt><i>image1</i></dt>
286
 
<dd>
287
 
Second image.</dd>
288
 
<dt>Returns:</dt>
289
 
<dd>
290
 
An image object.</dd>
291
 
</dl><br />
292
 
</dd>
293
 
</dl>
294
 
</body></html>
 
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.ImageChops Module</title>
 
6
<link rel='stylesheet' href='effbot.css' type='text/css' />
 
7
</head>
 
8
<body>
 
9
<h1>The PIL.ImageChops Module</h1>
 
10
<p>The <b>ImageChops</b> module contains a number of arithmetical image
 
11
operations, called <i>channel operations</i> ("chops"). These can be
 
12
used for various purposes, including special effects, image
 
13
compositions, algorithmic painting, and more.
 
14
</p><p>
 
15
At this time, channel operations are only implemented for 8-bit
 
16
images (e.g. "L" and "RGB").
 
17
</p><p>
 
18
Most channel operations take one or two image arguments and returns
 
19
a new image.  Unless otherwise noted, the result of a channel
 
20
operation is always clipped to the range 0 to MAX (which is 255 for
 
21
all modes supported by the operations in this module).
 
22
</p><h2>Module Contents</h2>
 
23
<dl>
 
24
<dt><a id='PIL.ImageChops.add-function' name='PIL.ImageChops.add-function'><b>add(image1, image2, scale=1.0, offset=0)</b></a> [<a href='#PIL.ImageChops.add-function'>#</a>]</dt>
 
25
<dd>
 
26
<p>Add images
 
27
((image1 + image2) / scale + offset).
 
28
</p><p>
 
29
Adds two images, dividing the result by scale and adding the
 
30
offset. If omitted, scale defaults to 1.0, and offset to 0.0.
 
31
 
 
32
</p><dl>
 
33
<dt><i>image1</i></dt>
 
34
<dd>
 
35
</dd>
 
36
<dt><i>image1</i></dt>
 
37
<dd>
 
38
</dd>
 
39
<dt>Returns:</dt>
 
40
<dd>
 
41
</dd>
 
42
</dl><br />
 
43
</dd>
 
44
<dt><a id='PIL.ImageChops.add_modulo-function' name='PIL.ImageChops.add_modulo-function'><b>add_modulo(image1, image2)</b></a> [<a href='#PIL.ImageChops.add_modulo-function'>#</a>]</dt>
 
45
<dd>
 
46
<p>Add images without clipping
 
47
((image1 + image2) % MAX).
 
48
</p><p>
 
49
Adds two images, without clipping the result.
 
50
 
 
51
</p><dl>
 
52
<dt><i>image1</i></dt>
 
53
<dd>
 
54
</dd>
 
55
<dt><i>image1</i></dt>
 
56
<dd>
 
57
</dd>
 
58
<dt>Returns:</dt>
 
59
<dd>
 
60
</dd>
 
61
</dl><br />
 
62
</dd>
 
63
<dt><a id='PIL.ImageChops.blend-function' name='PIL.ImageChops.blend-function'><b>blend(image1, image2, alpha)</b></a> [<a href='#PIL.ImageChops.blend-function'>#</a>]</dt>
 
64
<dd>
 
65
<p>Blend images using constant transparency weight.
 
66
</p><p>
 
67
Same as the <b>blend</b> function in the <b>Image</b> module.
 
68
</p></dd>
 
69
<dt><a id='PIL.ImageChops.composite-function' name='PIL.ImageChops.composite-function'><b>composite(image1, image2, mask)</b></a> [<a href='#PIL.ImageChops.composite-function'>#</a>]</dt>
 
70
<dd>
 
71
<p>Create composite using transparency mask.
 
72
</p><p>
 
73
Same as the <b>composite</b> function in the <b>Image</b> module.
 
74
</p></dd>
 
75
<dt><a id='PIL.ImageChops.constant-function' name='PIL.ImageChops.constant-function'><b>constant(image, value)</b></a> [<a href='#PIL.ImageChops.constant-function'>#</a>]</dt>
 
76
<dd>
 
77
<dl>
 
78
<dt><i>image</i></dt>
 
79
<dd>
 
80
</dd>
 
81
<dt><i>value</i></dt>
 
82
<dd>
 
83
</dd>
 
84
<dt>Returns:</dt>
 
85
<dd>
 
86
</dd>
 
87
</dl><br />
 
88
</dd>
 
89
<dt><a id='PIL.ImageChops.darker-function' name='PIL.ImageChops.darker-function'><b>darker(image1, image2)</b></a> [<a href='#PIL.ImageChops.darker-function'>#</a>]</dt>
 
90
<dd>
 
91
<p>Compare images, and return darker pixel value
 
92
(min(image1, image2)).
 
93
</p><p>
 
94
Compares the two images, pixel by pixel, and returns a new image
 
95
containing the darker values.
 
96
 
 
97
</p><dl>
 
98
<dt><i>image1</i></dt>
 
99
<dd>
 
100
</dd>
 
101
<dt><i>image1</i></dt>
 
102
<dd>
 
103
</dd>
 
104
<dt>Returns:</dt>
 
105
<dd>
 
106
</dd>
 
107
</dl><br />
 
108
</dd>
 
109
<dt><a id='PIL.ImageChops.difference-function' name='PIL.ImageChops.difference-function'><b>difference(image1, image2)</b></a> [<a href='#PIL.ImageChops.difference-function'>#</a>]</dt>
 
110
<dd>
 
111
<p>Calculate absolute difference
 
112
(abs(image1 - image2)).
 
113
</p><p>
 
114
Returns the absolute value of the difference between the two images.
 
115
 
 
116
</p><dl>
 
117
<dt><i>image1</i></dt>
 
118
<dd>
 
119
</dd>
 
120
<dt><i>image1</i></dt>
 
121
<dd>
 
122
</dd>
 
123
<dt>Returns:</dt>
 
124
<dd>
 
125
</dd>
 
126
</dl><br />
 
127
</dd>
 
128
<dt><a id='PIL.ImageChops.duplicate-function' name='PIL.ImageChops.duplicate-function'><b>duplicate(image)</b></a> [<a href='#PIL.ImageChops.duplicate-function'>#</a>]</dt>
 
129
<dd>
 
130
<dl>
 
131
<dt><i>image</i></dt>
 
132
<dd>
 
133
</dd>
 
134
<dt>Returns:</dt>
 
135
<dd>
 
136
</dd>
 
137
</dl><br />
 
138
</dd>
 
139
<dt><a id='PIL.ImageChops.invert-function' name='PIL.ImageChops.invert-function'><b>invert(image)</b></a> [<a href='#PIL.ImageChops.invert-function'>#</a>]</dt>
 
140
<dd>
 
141
<dl>
 
142
<dt><i>image</i></dt>
 
143
<dd>
 
144
</dd>
 
145
<dt>Returns:</dt>
 
146
<dd>
 
147
</dd>
 
148
</dl><br />
 
149
</dd>
 
150
<dt><a id='PIL.ImageChops.lighter-function' name='PIL.ImageChops.lighter-function'><b>lighter(image1, image2)</b></a> [<a href='#PIL.ImageChops.lighter-function'>#</a>]</dt>
 
151
<dd>
 
152
<p>Compare images, and return lighter pixel value
 
153
(max(image1, image2)).
 
154
</p><p>
 
155
Compares the two images, pixel by pixel, and returns a new image
 
156
containing the lighter values.
 
157
 
 
158
</p><dl>
 
159
<dt><i>image1</i></dt>
 
160
<dd>
 
161
</dd>
 
162
<dt><i>image1</i></dt>
 
163
<dd>
 
164
</dd>
 
165
<dt>Returns:</dt>
 
166
<dd>
 
167
</dd>
 
168
</dl><br />
 
169
</dd>
 
170
<dt><a id='PIL.ImageChops.logical_and-function' name='PIL.ImageChops.logical_and-function'><b>logical_and(image1, image2)</b></a> [<a href='#PIL.ImageChops.logical_and-function'>#</a>]</dt>
 
171
<dd>
 
172
</dd>
 
173
<dt><a id='PIL.ImageChops.logical_or-function' name='PIL.ImageChops.logical_or-function'><b>logical_or(image1, image2)</b></a> [<a href='#PIL.ImageChops.logical_or-function'>#</a>]</dt>
 
174
<dd>
 
175
</dd>
 
176
<dt><a id='PIL.ImageChops.logical_xor-function' name='PIL.ImageChops.logical_xor-function'><b>logical_xor(image1, image2)</b></a> [<a href='#PIL.ImageChops.logical_xor-function'>#</a>]</dt>
 
177
<dd>
 
178
</dd>
 
179
<dt><a id='PIL.ImageChops.multiply-function' name='PIL.ImageChops.multiply-function'><b>multiply(image1, image2)</b></a> [<a href='#PIL.ImageChops.multiply-function'>#</a>]</dt>
 
180
<dd>
 
181
<p>Superimpose positive images
 
182
(image1 * image2 / MAX).
 
183
</p><p>
 
184
Superimposes two images on top of each other. If you multiply an
 
185
image with a solid black image, the result is black. If you multiply
 
186
with a solid white image, the image is unaffected.
 
187
 
 
188
</p><dl>
 
189
<dt><i>image1</i></dt>
 
190
<dd>
 
191
</dd>
 
192
<dt><i>image1</i></dt>
 
193
<dd>
 
194
</dd>
 
195
<dt>Returns:</dt>
 
196
<dd>
 
197
</dd>
 
198
</dl><br />
 
199
</dd>
 
200
<dt><a id='PIL.ImageChops.offset-function' name='PIL.ImageChops.offset-function'><b>offset(image, xoffset, yoffset=None)</b></a> [<a href='#PIL.ImageChops.offset-function'>#</a>]</dt>
 
201
<dd>
 
202
<p>Offset image data.
 
203
</p><p>
 
204
Returns a copy of the image where data has been offset by the given
 
205
distances.  Data wraps around the edges.  If yoffset is omitted, it
 
206
is assumed to be equal to xoffset.
 
207
 
 
208
</p><dl>
 
209
<dt><i>image</i></dt>
 
210
<dd>
 
211
</dd>
 
212
<dt><i>xoffset</i></dt>
 
213
<dd>
 
214
</dd>
 
215
<dt><i>yoffset</i></dt>
 
216
<dd>
 
217
</dd>
 
218
<dt>Returns:</dt>
 
219
<dd>
 
220
</dd>
 
221
</dl><br />
 
222
</dd>
 
223
<dt><a id='PIL.ImageChops.screen-function' name='PIL.ImageChops.screen-function'><b>screen(image1, image2)</b></a> [<a href='#PIL.ImageChops.screen-function'>#</a>]</dt>
 
224
<dd>
 
225
<p>Superimpose negative images
 
226
(MAX - ((MAX - image1) * (MAX - image2) / MAX)).
 
227
</p><p>
 
228
Superimposes two inverted images on top of each other.
 
229
 
 
230
</p><dl>
 
231
<dt><i>image1</i></dt>
 
232
<dd>
 
233
</dd>
 
234
<dt><i>image1</i></dt>
 
235
<dd>
 
236
</dd>
 
237
<dt>Returns:</dt>
 
238
<dd>
 
239
</dd>
 
240
</dl><br />
 
241
</dd>
 
242
<dt><a id='PIL.ImageChops.subtract-function' name='PIL.ImageChops.subtract-function'><b>subtract(image1, image2, scale=1.0, offset=0)</b></a> [<a href='#PIL.ImageChops.subtract-function'>#</a>]</dt>
 
243
<dd>
 
244
<p>Subtract images
 
245
((image1 - image2) / scale + offset).
 
246
</p><p>
 
247
Subtracts two images, dividing the result by scale and adding the
 
248
offset. If omitted, scale defaults to 1.0, and offset to 0.0.
 
249
 
 
250
</p><dl>
 
251
<dt><i>image1</i></dt>
 
252
<dd>
 
253
</dd>
 
254
<dt><i>image1</i></dt>
 
255
<dd>
 
256
</dd>
 
257
<dt>Returns:</dt>
 
258
<dd>
 
259
</dd>
 
260
</dl><br />
 
261
</dd>
 
262
<dt><a id='PIL.ImageChops.subtract_modulo-function' name='PIL.ImageChops.subtract_modulo-function'><b>subtract_modulo(image1, image2)</b></a> [<a href='#PIL.ImageChops.subtract_modulo-function'>#</a>]</dt>
 
263
<dd>
 
264
<p>Subtract images without clipping
 
265
((image1 - image2) % MAX).
 
266
</p><p>
 
267
Subtracts two images, without clipping the result.
 
268
 
 
269
</p><dl>
 
270
<dt><i>image1</i></dt>
 
271
<dd>
 
272
</dd>
 
273
<dt><i>image1</i></dt>
 
274
<dd>
 
275
</dd>
 
276
<dt>Returns:</dt>
 
277
<dd>
 
278
</dd>
 
279
</dl><br />
 
280
</dd>
 
281
</dl>
 
282
</body></html>