Returns the pixel value at (x,y) in the reference c.
Note that the range of the parameters is not checked.