【发布时间】:2013-07-29 10:33:42
【问题描述】:
我使用 ios 的系统相机拍摄了两张照片,一张是纵向模式,另一张是横向模式,然后我使用 imagePicker 在我的应用中挑选它们,如下所示:
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
UIImage* sourceImage = [info objectForKey:UIImagePickerControllerOriginalImage];
UIImageOrientation imageOrientation = sourceImage.imageOrientation;
NSLog(@"%d",imageOrientation);
}
请注意,我 NSLog 了我刚刚挑选的图像的 UIImageOrientation 值。 结果是 纵向模式照片的值为 3(代表 UIImageOrientationRight)而 横向模式照片的值为 0 (UIImageOrientationUp) 我只是不明白为什么。谁能解释一下?谢谢!
【问题讨论】:
-
这个问题让我得到了正确答案。这应该是一个赞成票。
-
该问题无故被否决。这是一个完全有效的问题
标签: ios objective-c landscape-portrait uiimageorientation