Hello,

I'm trying to use ImageFile.Parser() to parse a PNG file like this:
>>> import ImageFile
>>> f = open('pic.png')
>>> p=ImageFile.Parser()
>>> p.feed(f.read())
>>> i=p.close()
>>> i.show()

And I'm getting:
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
File "/data/apogee/pythonpath/lib64/python2.4/site-packages/PIL/ Image.py", line 1449, in show
    _showxv(self, title, command)
File "/data/apogee/pythonpath/lib64/python2.4/site-packages/PIL/ Image.py", line 2082, in _showxv
    file = image._dump(format=format)
File "/data/apogee/pythonpath/lib64/python2.4/site-packages/PIL/ Image.py", line 476, in _dump
    self.load()
File "/data/apogee/pythonpath/lib64/python2.4/site-packages/PIL/ ImageFile.py", line 189, in load
    s = read(self.decodermaxblock)
File "/data/apogee/pythonpath/lib64/python2.4/site-packages/PIL/ PngImagePlugin.py", line 365, in load_read
    return self.fp.read(bytes)
File "/data/apogee/pythonpath/lib64/python2.4/site-packages/PIL/ ImageFile.py", line 300, in read
    data = self.data[pos:pos+bytes]
TypeError: unsubscriptable object


The problem has been noted on that very list before:
http://www.mailinglistarchive.com/image-sig@python.org/msg00513.html

I am wandering if a bug report has been opened, and if any workaround exists.
Thanks,

   Stephane

_______________________________________________
Image-SIG maillist  -  Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to