Python (PIL): Lighten transparent image and paste to another one
问题 I have two png-images (A & B) of the same size, the second (B) one is partially transparent. If I paste image B into image A using the code base.paste(overlay, mask=overlay) I get a nearly perfect combination of them. But I want to lighten image B before pasting it into image A. I have tried using a mask like Image.new("L", size, 80) and I can lighten image (B) with it, but it also darkens image (A) and that must not modified. On the command line, I can do what I want with ImageMagick like