Get the colors from an image with the HTML5 canvas element