I'm getting inconsistent results depending on whether I get the image directly from the camera in the callback or choosing it from the camera roll.
In the UIImagePickerControllerDelegate
callback method, the UIImage.imageOrientation
comes up as UIImageOrientationRight
no matter how the photo is taken.
When reading it off the Camera Roll, a landscape shot (turned left) comes up UIImageOrientationUp
while a portrait shot comes up UIImageOrientationRight
.
How can I reliably get the camera orientation in both situations?