Support for reading 12 bit tiff images

Fixes #414. 

  x Needs tested on Bigendian systems.  
  x Should be tested with libtiff as well.