我正在使用选择器视图从相册中选择图像。我使用上面的代码:
-(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
updateImage = [info objectForKey:UIImagePickerControllerOriginalImage];
[self.view addSubview:[MUtility sharedObject].loadingView ];
[self dismissViewControllerAnimated:YES completion:nil];
}
之后我上传到服务器并使用此代码
NSData *imageData = UIImageJPEGRepresentation(updateImage, 0.1);
但是这张图片旋转了 90 度。只有肖像照片旋转。我怎么解决这个问题 ?