Created
March 30, 2018 20:40
-
-
Save pawlos/44511627e576e15461478bcca45e5f22 to your computer and use it in GitHub Desktop.
removing the transparent from the PNG image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
png = Image.open('something_suspicious.png') | |
background = Image.new("RGB", png.size, (0, 0, 0)) | |
background.paste(png) | |
background.save('foo.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment