Detecting iPhone camera orientation
Posted
by Stephen Petschulat
on Stack Overflow
See other posts from Stack Overflow
or by Stephen Petschulat
Published on 2009-05-25T03:29:03Z
Indexed on
2010/04/09
6:03 UTC
Read the original article
Hit count: 445
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?
© Stack Overflow or respective owner