added support for gray scale images in reading.
added support for gray scale for PFM