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()