cisforcojo
April 13th, 2007, 07:05 PM
Hey guys,
I'm trying to use the PIL to extract pixel information from a .png file and I'm falling on my face.
My sticking point (right now) is Python is saying the list object isn't callable.
Here is my code:
----------------------------------------------------------------------
import Image
image = Image.open('myfile.png')
pix = list(image.load())
for x in pix:
print x
---------------------------------------------------------------------
The error I'm getting is:
TypeError: 'list' object is not callable
I've seen this done in tutorials and I don't know why it's not working for me.
Thanks for the help!
I'm trying to use the PIL to extract pixel information from a .png file and I'm falling on my face.
My sticking point (right now) is Python is saying the list object isn't callable.
Here is my code:
----------------------------------------------------------------------
import Image
image = Image.open('myfile.png')
pix = list(image.load())
for x in pix:
print x
---------------------------------------------------------------------
The error I'm getting is:
TypeError: 'list' object is not callable
I've seen this done in tutorials and I don't know why it's not working for me.
Thanks for the help!