Transform a grayscale image so that instead of containing gray pixels, it contains the channel type of the pixel.