I am loading JPGs that are flagged with arbitrary EXIF orientation data (one of 8 orientations). I downloaded the eight sample image files from here (linked from this blog post).
Image 8 represents EXIF tag 8, which is a 90 degree clockwise rotation. This can be confirmed by looking at this image in a dumb viewer, like Paintbrush.
However, when I load it in a UIImage in my iOS project, and call -imageOrientation
on it, I get UIImageOrientationLeft
. According to the docs here,
UIImageOrientationLeft
The image is rotated 90 degrees counterclockwise, as shown here.
...which is not what the underlying image looks like.
The opposite is true of EXIF orientation 6, which I expect to show up as Left, but which appears as Right.
Are the docs wrong here? Am I missing something obvious? Thanks.