Menu

#2 Problem reading pgm files

open
None
5
2014-09-12
2014-09-12
Andy Gotz
No

Fabio cannot read my pgm file (image0001.pgm) which other tools like gimp can. If the header is this :
P5
1024
1024
65535

the stack trace is:

fabio.open("image0001.pgm")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/fabio/openimage.py", line 113, in openimage
obj = obj.read(filename, frame)
File "/usr/lib/python2.7/dist-packages/fabio/pnmimage.py", line 93, in read
self._readheader(infile)
File "/usr/lib/python2.7/dist-packages/fabio/pnmimage.py", line 70, in _readheader
self.dim1, self.dim2 = int(dims[0]), int(dims[1])
IndexError: list index out of range</module></stdin>

Discussion


Log in to post a comment.

MongoDB Logo MongoDB