Created
March 28, 2014 17:02
-
-
Save w0rm/9837645 to your computer and use it in GitHub Desktop.
Fix png images for compass sprite generator
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
#!/usr/bin/env python | |
# | |
# Script to convert png files to RGBA color space | |
# Requires Pillow (pip install Pillow) | |
# | |
import os | |
import fnmatch | |
from PIL import Image | |
for root, dirnames, filenames in os.walk('sprites'): | |
for filename in fnmatch.filter(filenames, '*.png'): | |
image_path = os.path.join(root, filename) | |
print image_path | |
Image.open(image_path).convert('RGBA').save(image_path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the only evidence of the problem that I have found: https://groups.google.com/forum/#!topic/compass-users/U6xMb5INZhA