Adds a faster implementation to get the RGB values of an image.