Hello

I'm having trouble parsing a PNG image. This snippet should show my problem:

from PIL import ImageFile
import StringIO
import urllib2
f = 
urllib2.urlopen(urllib2.Request(url='http://www.bold.dk/billeder/art8651.png'))
p = ImageFile.Parser()
p.feed(f.read())
im = p.close()
output = StringIO.StringIO()
im.save(output, format="image/png")

I keep getting:

   File "/usr/lib/python2.4/site-packages/PIL/ImageFile.py", line 298, 
in read
     data = self.data[pos:pos+bytes]
TypeError: unsubscriptable object

Am I doing something wrong?

-- 
Christian Joergensen | Linux, programming or web consultancy
http://www.razor.dk  |     Visit us at: http://www.gmta.info
_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to