As olt already pointed out, Image.paste does not work correctly when the source and destination contain alpha.
Consider the following scenario:
Two test images, both contain alpha:

layer1 = Image.open("layer1.png") layer2 = Image.open("layer2.png")
Map an image using Image.paste as follows:
final1 = Image.new("RGBA", layer1.size) final1.paste(layer1, (0,0), layer1) final1.paste(layer2, (0,0), layer2)
creates the following image (the alpha part of the superimposed red pixels is completely taken from the second layer. Pixels do not mix correctly):

Map an image using Image.alpha_composite as follows:
final2 = Image.new("RGBA", layer1.size) final2 = Image.alpha_composite(final2, layer1) final2 = Image.alpha_composite(final2, layer2)
displays the following (correct) image:

P.Melch Apr 20 '17 at 8:50 2017-04-20 08:50
source share