H
H
Hachiman Hikigaya2020-10-28 15:52:39
Python
Hachiman Hikigaya, 2020-10-28 15:52:39

How to overlay different sized images on top of each other Python?

Hello,
I'm working with the pillow library for editing images. My task was to create a program that receives a background image and text as input. Everything was "perfect" until it came to overlaying images.
Here is my Photoshop template:
5f99672dce553669091864.png
The code is quite long, so in words.
As you understand, there is one image at the input. Two variables are assigned to the original. It turns out two images. One image is enlarged, blurred and darkened, then cropped to 900x564. The second image is cropped so that the height is equal to 564.
And kr4 two images are obtained:
image.png
image.png

Ash stump, that they are of different sizes. But both image.past() and Image.composite() require the images to be the same size. Nonsense, friends.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-10-28
@bacon

But both image.past() and Image.composite() require the images to be the same size.
image.paste does not require this
Threat and what for to drag politota here, what kind of debilizm?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question