Untitled

mail@pastecode.io avatar
unknown
python
2 years ago
598 B
3
Indexable
Never
from PIL import Image

new_image: Image = Image.new('RGB', (512, 512))
pixels: list = []
width, height = new_image.size
for i in range(width * height):
    if width * 169 < i and width * 170 > i:
        pixels.append((255, 255, 255))
    elif width * 339 < i and width * 340 > i:
        pixels.append((255, 255, 255))
    elif i % (172 + width * (i // width)) == 0:
        pixels.append((255, 255, 255))
    elif i % (344 + width * (i // width)) == 0:
        pixels.append((255, 255, 255))
    else:
        pixels.append((0, 0, 0))
new_image.putdata(pixels)
new_image.show()