Support for image orientations. (From Shani Hajbi)