Is it possible to get the RGB color of a pixel using PIL?
I'm using this code:
im = Image.open("image.gif")
pix = im.load()
print(pix[1,1])
However, it only outputs a number (e.g. 0
or 1
) and not three numbers (e.g. 60,60,60
for R,G,B). I guess I'm not understanding something about the function. I'd love some explanation.
Thanks a lot.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…