Skip to content

Instantly share code, notes, and snippets.

@tag1216
Created December 7, 2016 08:03
Show Gist options
  • Save tag1216/5e9d8540a90ea26d5e6676e64d8360b6 to your computer and use it in GitHub Desktop.
Save tag1216/5e9d8540a90ea26d5e6676e64d8360b6 to your computer and use it in GitHub Desktop.
Python Pillow で透過画像の判定
from PIL import Image
img = Image.open("test.png")
if img.mode == 'RGBA' or "transparency" in img.info:
print("透過画像")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment