"illegal image mode" when trying to subtract a png from another by using putalpha #7295
Answered
by
radarhere
Nicolas-Gth
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
radarhere
Jul 21, 2023
Replies: 1 comment 9 replies
-
I think you've correctly understood that the However, what I think you've missed is that So I would suggest just changing substractShapeBackGround.convert('L').resize(reflexionBackground.size) to substractShapeBackGround = substractShapeBackGround.convert('L').resize(reflexionBackground.size) |
Beta Was this translation helpful? Give feedback.
9 replies
Answer selected by
radarhere
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you've correctly understood that the
alpha
argument toputalpha()
"can either be an “L” or “1” image"However, what I think you've missed is that
convert()
"Returns a converted copy of this image". A copy. It does not modify the original. The same goes forresize()
.So I would suggest just changing
to