Created
May 30, 2020 17:13
-
-
Save Allwin12/7bd1603b872386152aba7752539bef91 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
import numpy as np | |
from PIL import Image | |
import random | |
data = np.zeros((1024, 1024, 3), dtype=np.uint8) | |
data[512, 512] = [254, 0, 0] | |
for i in range(0, 1024): | |
for j in range(0, 1024): | |
data[i, j] = [random.randint(0, 255), random.randint(0, 255), random.randint(0, 255)] | |
img = Image.fromarray(data, 'RGB') | |
img.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment