I was trying to run a python script (python 2.6) which contains the code as below
import Image
def is_grey_scale(img_path="lena.jpg"):
im = Image.open(img_path)
w,h = im.size
for i in range(w):
for j in range(h):
r,g,b,_ = im.getpixel((i,j))
if r != g != b:
return False
return True
It is reporting error as defined below.
r,g,b, _ = im.getpixel((i, j))
TypeError: 'int' object is not iterable
Can you please let me know what is the error here.