Add support for grayscale images