Transform color images to grayscale