Skip to content

Instantly share code, notes, and snippets.

@pawlos
Created March 30, 2018 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pawlos/44511627e576e15461478bcca45e5f22 to your computer and use it in GitHub Desktop.
Save pawlos/44511627e576e15461478bcca45e5f22 to your computer and use it in GitHub Desktop.
removing the transparent from the PNG image
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