ringa_lee2017-04-17 17:47:40
You can take a look at the documentation about UIImage imageOrientation property. There are also many codes for correcting orientation on the Internet.
怪我咯2017-04-17 17:47:40
Like this
UIImage* image=[info objectForKey:UIImagePickerControllerOriginalImage];
UIImageOrientation imageOrientation=image.imageOrientation;
if(imageOrientation!=UIImageOrientationUp)
{
// 原始图片可以根据照相时的角度来显示,但UIImage无法判定,于是出现获取的图片会向左转90度的现象。
// 以下为调整图片角度的部分
UIGraphicsBeginImageContext(image.size);
[image drawInRect:CGRectMake(0, 0, image.size.width, image.size.height)];
image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
// 调整图片角度完毕
}