Created
May 1, 2016 00:28
-
-
Save rmamba/760686caac72e719dcb6b9493885e03e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
size = 16 | |
im = Image.open("cards-001.png") | |
w = 0 | |
h = 0 | |
while h + size < im.size[1]: | |
w = 0 | |
while w + size < im.size[0]: | |
im.crop((w, h, w+size, h+size)).save('cards-001-%s-%s.png' % (h, w)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment