@@ -54,7 +54,7 @@ def invert(image):
5454def lighter (image1 , image2 ):
5555 """
5656 Compares the two images, pixel by pixel, and returns a new image containing
57- the lighter values. At least one of the images must have mode "1".
57+ the lighter values.
5858
5959 .. code-block:: python
6060
@@ -71,7 +71,7 @@ def lighter(image1, image2):
7171def darker (image1 , image2 ):
7272 """
7373 Compares the two images, pixel by pixel, and returns a new image containing
74- the darker values. At least one of the images must have mode "1".
74+ the darker values.
7575
7676 .. code-block:: python
7777
@@ -88,7 +88,7 @@ def darker(image1, image2):
8888def difference (image1 , image2 ):
8989 """
9090 Returns the absolute value of the pixel-by-pixel difference between the two
91- images. At least one of the images must have mode "1".
91+ images.
9292
9393 .. code-block:: python
9494
@@ -107,8 +107,7 @@ def multiply(image1, image2):
107107 Superimposes two images on top of each other.
108108
109109 If you multiply an image with a solid black image, the result is black. If
110- you multiply with a solid white image, the image is unaffected. At least
111- one of the images must have mode "1".
110+ you multiply with a solid white image, the image is unaffected.
112111
113112 .. code-block:: python
114113
@@ -124,8 +123,7 @@ def multiply(image1, image2):
124123
125124def screen (image1 , image2 ):
126125 """
127- Superimposes two inverted images on top of each other. At least one of the
128- images must have mode "1".
126+ Superimposes two inverted images on top of each other.
129127
130128 .. code-block:: python
131129
@@ -179,7 +177,6 @@ def add(image1, image2, scale=1.0, offset=0):
179177 """
180178 Adds two images, dividing the result by scale and adding the
181179 offset. If omitted, scale defaults to 1.0, and offset to 0.0.
182- At least one of the images must have mode "1".
183180
184181 .. code-block:: python
185182
@@ -196,8 +193,7 @@ def add(image1, image2, scale=1.0, offset=0):
196193def subtract (image1 , image2 , scale = 1.0 , offset = 0 ):
197194 """
198195 Subtracts two images, dividing the result by scale and adding the offset.
199- If omitted, scale defaults to 1.0, and offset to 0.0. At least one of the
200- images must have mode "1".
196+ If omitted, scale defaults to 1.0, and offset to 0.0.
201197
202198 .. code-block:: python
203199
@@ -212,8 +208,7 @@ def subtract(image1, image2, scale=1.0, offset=0):
212208
213209
214210def add_modulo (image1 , image2 ):
215- """Add two images, without clipping the result. At least one of the images
216- must have mode "1".
211+ """Add two images, without clipping the result.
217212
218213 .. code-block:: python
219214
@@ -228,8 +223,7 @@ def add_modulo(image1, image2):
228223
229224
230225def subtract_modulo (image1 , image2 ):
231- """Subtract two images, without clipping the result. At least one of the
232- images must have mode "1".
226+ """Subtract two images, without clipping the result.
233227
234228 .. code-block:: python
235229
@@ -244,8 +238,10 @@ def subtract_modulo(image1, image2):
244238
245239
246240def logical_and (image1 , image2 ):
247- """Logical AND between two images. At least one of the images must have
248- mode "1".
241+ """Logical AND between two images.
242+
243+ Both of the images must have mode "1". For an AND in RGB mode, use a
244+ multiply() by a black-and-white mask.
249245
250246 .. code-block:: python
251247
@@ -260,8 +256,9 @@ def logical_and(image1, image2):
260256
261257
262258def logical_or (image1 , image2 ):
263- """Logical OR between two images. At least one of the images must have
264- mode "1".
259+ """Logical OR between two images.
260+
261+ Both of the images must have mode "1".
265262
266263 .. code-block:: python
267264
@@ -276,8 +273,9 @@ def logical_or(image1, image2):
276273
277274
278275def logical_xor (image1 , image2 ):
279- """Logical XOR between two images. At least one of the images must have
280- mode "1".
276+ """Logical XOR between two images.
277+
278+ Both of the images must have mode "1".
281279
282280 .. code-block:: python
283281
0 commit comments