fixed case when image dtype is int16.