Answer the question
In order to leave comments, you need to log in
How to insert an image with a transparent background on top of another in PIL?
I need to insert an image with a transparent background on another
I used: img.paste(img2,box,mask = img2)
But if the image is white then an error is thrown:
Traceback (most recent call last):
File "C:/Users/Даниил/PycharmProjects/discordbot/test.py", line 32, in <module>
img.paste(item, (3, 3), mask=item)
File "C:\Users\Даниил\AppData\Local\Programs\Python\Python36\lib\site-packages\PIL\Image.py", line 1421, in paste
self.im.paste(im, box, mask.im)
ValueError: bad transparency mask
Answer the question
In order to leave comments, you need to log in
You need nodejs , and then the commands are written there.
npm install peer - install peer package
peerjs --port 9000 --key peerjs - and this command, as I understand it, starts the server and port 9000
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question