Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 377 Bytes

89.md

File metadata and controls

23 lines (16 loc) · 377 Bytes

Python script:

from PIL import Image

imgfile = "out copy.jpg"
img = Image.open(imgfile)

w = 304
h = img.width // w

new_img = Image.new(img.mode, (w, h))

for i in range(img.width):
    col = i // h
    row = i % h
    pixel = img.getpixel((i, 0))
    new_img.putpixel((col, row), pixel)

new_img.show()