I have PPM-P6 image file which is in binary format .The file is of the type  :-

P6
128 128
255
ߢ…ä£{ä¡~ߟxÞ¡yàšfß›lÜšyâ›jåŸhæ¦ué­yê§vé¡pÛš»ubž^Y¦f](c)g ..........and so on.

How can i read the 4th line (binary) and convert it to an equivalent
ascii string. I used the following method but couldn't get the desired
result..

import binascii
from binascii import b2a_uu
infile=open("C:\\Documents and Settings\\Desktop\\lena.ppm")
a=infile.readline()
b=infile.readline()
c=infile.readline()
d=infile.readline()
z=b2a_uu(d)
print z

This script gave me some random absurd data as output.
Plz help
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to