Created
March 19, 2014 20:06
-
-
Save giginet/9650080 to your computer and use it in GitHub Desktop.
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
# -*- coding: utf-8 -*- | |
# | |
# cocos2d-x-icon-generator.py | |
# created by giginet on 2014/02/27 | |
# | |
import sys | |
from PIL import Image | |
SIZES = ( | |
(29, 29), | |
(40, 40), | |
(50, 50), | |
(57, 57), | |
(58, 58), | |
(72, 72), | |
(76, 76), | |
(80, 80), | |
(100, 100), | |
(114, 114), | |
(120, 120), | |
(144, 144), | |
(152, 152) | |
) | |
if __name__ == '__main__': | |
filename = sys.argv[1] | |
original = Image.open(filename) | |
for size in SIZES: | |
resized = original.resize(size, Image.ANTIALIAS) | |
resized.save("Icon-%d.png" % size[0]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment