[Image-SIG] buffer is not large enough

Manik Bali bali at dkrz.de
Thu Apr 15 11:01:49 EDT 2004


Hi
I am trying to make a histogram() for my pgm image( which is basically a
four line
header information followed by binary data )
And it gives the following error.
>>> import Image
>>> im=Image.open("glc2000_beta3.pgm")
>>> im.histogram()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File
"/scratch/local2/m212005/opt/cdat/lib/python2.2/site-packages/PIL/Image.py",
line 807, in histogram
    self.load()
  File
"/scratch/local2/m212005/opt/cdat/lib/python2.2/site-packages/PIL/ImageFile.py",
line 144, in load
    self.im = Image.core.map_buffer(
ValueError: buffer is not large enough

The size of pgm file is 591614803. 
Is there a way out..
Rgds 
Manik Bali
Max Planck Institute.
Germany




More information about the Image-SIG mailing list