Playing with pbm in P4 is simple.
BUT. If i have TRUE pbm in P1 i have some fun.
I can write pbm file
# cool image
I can convert it into 1 string
But i can't display it correctly.
Code: Select all
with open('arrow.pbm') as f: data_list = f.readlines() # for framebuffer [width, hight] = (data_list.split()) body = '' body += body.join(data_list[3:]).replace('\n', '')
i mean i must encode all binary characters into bytes. but how?
where is instruction about bytes? (crying)