Added a function to get a pixel from a surface.