代码如下:
from PIL import Image
img = Image.open("test.png")
pix = img.load()
(r,g,b) = pix[10,20]
print "R[%d],G[%d],B[%d]" % (r,g,b)
昨天天气很好。现在如果我运行它:
$ python test.py
Traceback (most recent call last):
File "test.py", line 4, in <module>
(r,g,b) = pix[10,20]
TypeError: 'int' object is not iterable
我不知道为什么它不起作用了。 任何帮助都将不胜感激
编辑:解决方法:sudo apt get install--重新安装python映像
目前没有回答
相关问题 更多 >
编程相关推荐