[IMAGE-SIG] Problems with *tostring* on PPM images [PILv0.3a1]

Lopez-Gulliver, Roberto gulliver@mic.atr.co.jp
Sat, 6 Dec 1997 23:20:37 +0900 (JST)


Hi there,

I'm having problems with *tostring* on PPM images [PILv0.3a1]. This used
to work OK with PILv0.2b3,  can any one out there enlighten me on this?

Oopps, I'm in a SGI with IRIX6.2 it this helps at all.
 
This is what I get:

gulliver % python
Python 1.4 (Mar 11 1997) [C]
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import Image
import Image
>>> im = Image.open ("image.ppm")
im = Image.open ("image.ppm")
>>> print im
print im
<PpmImageFile instance at 10062fc8>
>>> data = im.tostring ()
data = im.tostring ()
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/home/gulliver/PYTHON/PIL/Image.py", line 244, in tostring
    self.load()
  File "/home/gulliver/PYTHON/PIL/ImageFile.py", line 109, in load
    self.im = Image.core.new(self.mode, self.size)
ValueError: Illegal mode
>>> print im.mode
'RGB'
>>> ????

Any clues/hints?

Thanks for any/all help.

--Roberto

BTW, I have problems tracking what's the latest(best?) version of PIL. I
have PILv0.3a1 and PIILv0.2b3 from the starship and python sites respectively.
Also the manual/handbook say nothing about *to|fromstring* making its use
misterous. Of course, by looking at the source anybody can see what they
do but...

         -----------------------------------------------------------
         Roberto Lopez Gulliver
         ATR Media Integration & Communications Research Labs.
         2-2 Hikaridai / Seika-cho, Soraku-gun / Kyoto 619-02, JAPAN
         tel: +81-774-95-1455   gulliver@mic.atr.co.jp      
         fax: +81-774-95-1408   http://www.mic.atr.co.jp/~gulliver
         -----------------------------------------------------------


_______________
IMAGE-SIG - SIG on Image Processing with Python

send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
_______________