Created
February 16, 2010 14:14
-
-
Save bycoffe/305544 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
import Image | |
import sys | |
def make_image(color, filename, dimensions=(1,1)): | |
"""Create a solid-color image.""" | |
im = Image.new('RGB', dimensions, color) | |
im.save(filename) | |
if __name__ == '__main__': | |
color = sys.argv[-2] | |
filename = sys.argv[-1] | |
make_image(color, filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment