Skip to content

Instantly share code, notes, and snippets.

@bycoffe
Created February 16, 2010 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bycoffe/305544 to your computer and use it in GitHub Desktop.
Save bycoffe/305544 to your computer and use it in GitHub Desktop.
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