correct bug when gray-reading uint8 color images