Hi, I want to convert an MSP image to a PNG image, but I get errors whenreading the MSP image. I'm attaching the gzipped input image image.msp that I had to rename to image._msp, because of my mail server. This is the script:
> #!/usr/bin/python
>
> import Image
> import sys
>
> im = Image.open("image.msp")
> im.save("image.png", "PNG")
This is the error that I get:
> Traceback (most recent call last):
> File "./test.py", line 7, in <module>
> im.save("image.png", "PNG")
> File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1373,
> in save
> self.load()
> File "/usr/lib/python2.5/site-packages/PIL/ImageFile.py", line
> 192, in load
> raise IOError("image file is truncated (%d bytes not processed)"
> % len(b))
> IOError: image file is truncated (0 bytes not processed)
When I call the verify method right after the open method, I get this:
> Traceback (most recent call last):
> File "./test.py", line 8, in <module>
> im.save("image.png", "PNG")
> File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1373,
> in save
> self.load()
> File "/usr/lib/python2.5/site-packages/PIL/ImageFile.py", line
> 161, in load
> read = self.fp.read
> AttributeError: 'NoneType' object has no attribute 'read'
I'm using Python 2.5.2 on Ubuntu 8.04.
Thanks & best,
Irek
--
Ireneusz (Irek) Szczesniak
http://www.irkos.org
image._msp.gz
Description: GNU Zip compressed data
_______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
