[Image-SIG] PIL code not working

Nils de Reus nils.de.reus at ivm.vu.nl
Mon Oct 4 09:48:59 CEST 2010

Coordinates passed to getpixel should be in a tuple, like this:

im.getpixel( (5, 7) )

From: image-sig-bounces+nils.de.reus=ivm.vu.nl at python.org [image-sig-bounces+nils.de.reus=ivm.vu.nl at python.org] On Behalf Of majoris.ursae at yahoo.co.uk [majoris.ursae at yahoo.co.uk]
Sent: Friday, September 24, 2010 3:32 AM
To: image-sig at python.org
Subject: [Image-SIG] PIL code not working

Hello everybody, Greetings!
In PIL, the following codes does not work anymore:
Does anyone knows what is wrong below and kindly suggest new codes?
>>> from PIL import Image
>>> im = Image.open('E://test.jpg')
>>> im.load()
>>> im.getpixel (5,7)
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
TypeError: getpixel() takes exactly 2 arguments (3 given)
>>> list(im.getdata())
no response for one day!
Thank you so much!!

More information about the Image-SIG mailing list