From the docs:
im.histogram() => list
Returns a histogram for the image. The histogram is returned as a list of pixel counts, one for each pixel value in the source image. If the image has more than one band, the histograms for all bands are concatenated (for example, the histogram for an “RGB” image contains 768 values).
I understand that there are 256 values for Red, 256 for Green and 256 for Blue (256 * 3 = 768).
for i, value in enumerate(im.histogram()):
print i, value
Produces:
0 329
1 145
... (skipping some)
256 460
... (skipping some)
767 3953
My question is: does that mean that there were:
329 pixels that had a value of R = 0, G = 0, B = 0
and
145 pixels that had a value of R = 1, G = 0, B = 0
and
460 pixels that had a value of R = 256, G = 1, B = 0
and
3953 pixels that had a value of R = 256, G = 256, B = 256
etc. ?
Is that how I should read the output?