readImage function

Read in an image as a 3D array