Created
April 23, 2013 07:24
-
-
Save nickelpro/5441493 to your computer and use it in GitHub Desktop.
Generates a reasonably random PNG image, relies on pypng
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
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