I take two photos using the ios`s system camera,which one is in portrait mode and another is in landscape mode, then I use imagePicker to pick them out in my app like this:
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
UIImage* sourceImage = [info objectForKey:UIImagePickerControllerOriginalImage];
UIImageOrientation imageOrientation = sourceImage.imageOrientation;
NSLog(@"%d",imageOrientation);
}
Note that I NSLog out the UIImageOrientation value of the image I just picked out. the result is the value for the portrait mode photo is 3(which represents UIImageOrientationRight) and the landscape mode photo is 0 (UIImageOrientationUp) I just do not understand why. can anyone explain that? thanks!