Guys.
I use getpixel & getdata to retrieve data from the same pic.but some points are different.
why?
im = Image.open("cljr.jpg")
t=list(im.getdata())
for i in range(10):
print "%d %x %x %x"%(i,t[i][0],t[i][1],t[i][2])
print ''
print "%x %x %x"% im.getpixel((0,7))
print "%x %x %x"% im.getpixel((0,8))
and here is the output:
0 ec f7 f9
1 ec f7 f9
2 ec f7 f9
3 ec f7 f9
4 ec f7 f9
5 ec f7 f9
6 ec f7 f9
7 ec f7 f9
8 eb f6 f8
9 eb f6 f8
ec f7 f9
ed f8 fa
From this, you can see that
im.getdatais ordered in column-major andim.getpixelwill be row-major.