Re: PIL code not working

Nils de Reus <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <57AE160B221E6F4EA096548C7DEE199B735F768C@ivm-mail>
Coordinates passed to getpixel should be in a tuple, like this:

im.getpixel( (5, 7) )


________________________________________
From: [email protected] [[email protected]] On Behalf Of [email protected] [[email protected]]
Sent: Friday, September 24, 2010 3:32 AM
To: [email protected]
Subject: [Image-SIG] PIL code not working

Hello everybody, Greetings!
In PIL, the following codes does not work anymore:
im.getpixel(5,7)
list(im.getdata())
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>
    im.getpixel(4,6)
TypeError: getpixel() takes exactly 2 arguments (3 given)
>>> list(im.getdata())
no response for one day!
Thank you so much!!

_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.