Account for grayscale input images