Skip to content

Instantly share code, notes, and snippets.

@lukakostic
Created August 31, 2018 05:17
Show Gist options
  • Save lukakostic/c65b826652d64688bbca0c7552e01981 to your computer and use it in GitHub Desktop.
Save lukakostic/c65b826652d64688bbca0c7552e01981 to your computer and use it in GitHub Desktop.
Produces a random colored noise image of size
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