PIL - getdata() putdata()

Joe Connellan joe at al.com.au
Mon Jan 14 18:50:49 EST 2002


Hi,
    can somebody tell me why this doesn't work?

>>> import Image
>>> im = Image.open("image.bmp")
>>> im.putdata(im.getdata())
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.1/site-packages/PIL/Image.py", line 636, in
putdata
    self.im.putdata(data, scale, offset)
TypeError: unrecognized image mode

It seems quite happy to get "RGB" data but not to put it. what do I need
to do for this to work?

thanks

Joe






More information about the Python-list mailing list