Created
August 31, 2018 05:17
-
-
Save lukakostic/c65b826652d64688bbca0c7552e01981 to your computer and use it in GitHub Desktop.
Produces a random colored noise image of size
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 | |
import numpy as np | |
import random | |
import time | |
random.seed(time.time()) | |
size = 256 #edit size here | |
im = Image.new('RGB', (size, size)) | |
for x in range(size): | |
for y in range(size): | |
im.putpixel((x, y), (random.randint(0,255), random.randint(0,255), random.randint(0,255))) | |
im.save('test.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment