Fix big-endian tiff images.
Merge remote-tracking branch 'upstream/master'
merge with upstream