I want to paste the first image (which is a simple vertical gradient, from transparent to black), at the bottom of the background.
The empty pixels in the background need to remain empty, and the rounded corners must be preserved. I know I need to use some combination of alpha_composite
, paste
and masking
but really could not figure it out.
How can I achieve this using python pillow library?
How to paste an image on top of another, the empty pixels of the background remain empty Python PIL
71 views Asked by kursatba At
1
Here's a way to do that: