Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (13 sloc) 301 Bytes
#!/usr/bin/python
import sys
import Image
buf = sys.stdin.read()
# rearrange buf into parallel columns
cols=256
w=8*cols
h=256*256/cols
img = Image.new("1",(w,h))
for c in range(cols):
colimg = Image.fromstring("1",(8,h),buf[c*h:(c+1)*h])
img.paste(colimg,(8*c,0))
img.save(sys.argv[1])
You can’t perform that action at this time.