List Info

Thread: problem with .ras files




problem with .ras files
user name
2007-03-28 09:35:33
Hello, this is my first email in this list.
I am trying to read the pixels of some .ras files, but an IndexError always happens.

>>>; import Image
>>> im = Image.open("C:/argus/etc/test.ras";)
>>> im
<SunImagePlugin.SunImageFile instance at 0x016A78F0>
>&gt;> data = im.getdata()

Traceback (most recent call last):
&nbsp; File "<pyshell#3&gt;", line 1, in -toplevel-
 &nbsp;  data = im.getdata()
  File "C:Python24Libsite-packagesPILImage.py", line 860, in getdata
&nbsp; &nbsp; self.load()
  File "C:Python24Libsite-packagesPILImageFile.py", line 138, in load
&nbsp; &nbsp; self.im = self.map.readimage(
IndexError: tuple index out of range
>>> im.getpixel((50,50))

Traceback (most recent call last):
&nbsp; File "<pyshell#4&gt;", line 1, in -toplevel-
 &nbsp;  im.getpixel((50,50))
  File "C:Python24Libsite-packagesPILImage.py", line 922, in getpixel
&nbsp;   self.load()
  File "C:Python24Libsite-packagesPILImageFile.py", line 138, in load
&nbsp; &nbsp; self.im = self.map.readimage(
IndexError: tuple index out of range

Anybody can help me?

Thanks and sorry about my bad English...

  Pablo Cavalcanti


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )