fix greyscale image output