support for image orientation
Merge pull request #764 from n13/master

support for image orientation