Why does PIL fail to merge 2 images in my code?
问题 I am trying to combine 2 images into a larger one with Image.paste function. I start by creating an image that can hold both images, and then paste in the 2 images: wrapper = Image.new("I", (width, height+textHeight)); if placement=="bottom": wrapper.paste(img1); wrapper.paste(textImage, (0, height, width, textHeight)); else: wrapper.paste(textImage); wrapper.paste(img1, (0,textHeight)); Then I get this error every time: File "C:\Python27\lib\site-packages\PIL\Image.py", line 1127, in paste