[Image-SIG] PIL problem

rjkimble at comcast.net rjkimble at comcast.net
Sun Aug 15 11:05:13 CEST 2004


Here's a curiosity. I played around with your example using my AlphaPC running Debian. I get the same results as you with both Python 2.2 and 2.3. However, I noticed a trick. I have no idea what's going on, but maybe it's a workaround.

When I run this, everything seems to work OK:

import Image
im = Image.open('title.png')
im2 = im.copy()
im2.verify()
im3 = im2.copy()

I haven't played around much with it, but maybe that can lead to a workaround for you until a real solution gets posted.

Regards,

.... Bob


> On Sat, 14 Aug 2004 4:41 pm, Thomas Clive Richards wrote:
> > Hi,
> >
> >
> > I'm trying to make a quick script which generates thumbnails for a website.
> > However, I can't get the thumbnail() method to work with PNG files.
> >
> 
> I've discovered further problems when I tried to do this manually. For 
> example:
> 
> thomi at Julie:/tmp/pics$ python2.2
> Python 2.2.3+ (#1, Feb 25 2004, 23:29:31)
> [GCC 3.3.3 (Debian)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import Image
> >>> im = Image.open('title.png')
> >>> im.verify()
> >>> im2 = im.copy()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.2/site-packages/PIL/Image.py", line 630, in copy
>     self.load()
>   File "/usr/lib/python2.2/site-packages/PIL/ImageFile.py", line 166, in load
>     self.load_seek(o)
>   File "/usr/lib/python2.2/site-packages/PIL/ImageFile.py", line 217, in 
> load_seek
>     self.fp.seek(pos)
> AttributeError: 'NoneType' object has no attribute 'seek'
> 
> 
> That doesn't seem right...
> 
> I get similar error messages when trying to perform any operations on PNG 
> files.
> 
> I also tried converting it to a BMP before performing any operations, but that 
> throws an error also.
> 
> There *must* be a fix for this.. surely someone else has come across this 
> problem?
> 
> Also, is this package dead? I remember a time when this was one of the most 
> active mailing lists I was subscribed to, now it seems like I'm the only one 
> alive...
> 
> -- 
> 
> Thomi Richards,
> thomi at once.net.nz
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig


More information about the Image-SIG mailing list