Clarify docstring about mask values [ci skip]

The behavior of paste() with regard to intermediate mask values was
unclear, so this commit clarifies how it works.
This commit is contained in:
Allen Li 2015-04-08 15:57:17 -04:00
parent 7f4cfdf36b
commit bb01e845ea

View File

@ -1288,7 +1288,13 @@ class Image:
images (in the latter case, the alpha band is used as mask).
Where the mask is 255, the given image is copied as is. Where
the mask is 0, the current value is preserved. Intermediate
values can be used for transparency effects.
values will mix the two images together. If this image has an
alpha channel, intermediate values will also set the alpha
channel to themselves.
See :py:meth:`~PIL.Image.Image.alpha_composite` if you want to
combine images with a partial mask without setting the alpha
channel.
Note that if you paste an "RGBA" image, the alpha band is
ignored. You can work around this by using the same image as