fixed case when image dtype is int16.
Merge pull request #1 from RLuckom/master

fixed case when image dtype is int16.