Also worth noting is that there's a companion function to ImageValue
, called PixelValue
. The difference between the two is, as far as I can tell from the documentation, that ImageValue
interpolates the color of a coordinate according to the colors of nearby pixels, whereas PixelValue
finds the color of the pixel whose centre is nearest to the integer values of the coordinates. The difference is hard to spot on smooth photographs, but possible:
tp = ExampleData[{"TestImage", "Mandrill"}];
Manipulate[Column
[{tp,
Text[p],
Text["ImageValue"],
ImageValue[tp, p],
Graphics[{
RGBColor[ImageValue[tp, p]],
Rectangle[{0, 0}, {3, 1}]}],
Text["PixelValue"],
PixelValue[tp, p],
Graphics[{
RGBColor[PixelValue[tp, p]],
Rectangle[{0, 0}, {3, 1}]}]
}],
{{p, {1, 1}}, Locator}
]

(Code adapted from this answer)