added function to read a map of values and colors from image-data.