python - Can't paste image due to ValueError: bad transparency mask -


creating program paste image on top of image. , when paste campaign logo made in photoshop, , when run program, error:

valueerror: bad transparency mask

i tried converting image rgba rgb, , did not work, here code:

def test(): background = image.open("photo.png") logo = image.open("66.png")  background_small = logo.resize(bg_size) logo_small = logo.resize(logo_size)  background.paste(logo, (0, 600), logo) background.show()  background.save('out.png') 

edit: fixed error using stackoverflow post: convert rgba png rgb pil


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -