s = ['110010010011', '101011010100', '110010110101', '100010010011']
s = map(lambda x: map(int, x), s)
f = StringIO()
w = png.Writer(len(s[0]), len(s), greyscale=True, bitdepth=1)
w.write(f, s)
print(f.getvalue())
Текст в PNG на App Engine (Python)