Merge pull request #414 from hean01/tiffreader

Rewrite of tiff reader code to support loading of grayscale images.