Last active
July 30, 2020 01:26
-
-
Save beans42/3d00f60979a7e20f845fcf8e841005e1 to your computer and use it in GitHub Desktop.
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
from PIL import Image, ImageOps | |
width, height = 3840, 2160 #can be any res | |
image = Image.new('RGB', (width, height), color = 'white') | |
pixels = image.load() | |
for y in range(height): | |
for x in range(width): | |
r = int(x / width * 255) | |
g = int(y / height * 255) | |
b = int(0.2 * 255) | |
pixels[x, y] = (r, g, b) | |
ImageOps.mirror(image).save('rainbow.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment