Skip to content

Instantly share code, notes, and snippets.

@nickelpro
Created April 23, 2013 07:24
Show Gist options
  • Save nickelpro/5441493 to your computer and use it in GitHub Desktop.
Save nickelpro/5441493 to your computer and use it in GitHub Desktop.
Generates a reasonably random PNG image, relies on pypng
import png
import random
random.seed()
pixels = [[random.randint(0, 255) for i in xrange(0, 3*64)] for i in xrange(0, 32)]
png.from_array(pixels, 'RGB').save('foo.png')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment