Support gray jpg image when use one channel