Support more input image formats: GIF, TIFF, ...

fix issue #42