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.
UIImageOrientationLeft
as "The image needs to be drawn 90 degrees counterclockwise", then it does make sense. This really seems to be the counterintuitive way to read it though-- the wording implies that this property reflects its current state, not an implied action. Am I getting you though? (Your first note about applying an orientation doesn't parse for me-- I don't know how you can "apply" an explicit orientation with UIKit-- it's a readonly property on the image) – Garges