UIImagePickerControllerOriginalImage仅在RAW图像上返回nil

时间:2015-04-29 10:22:09

标签: ios xcode swift uiimage uiimagepickercontroller

我有一个问题,当我尝试在didFinishPickingMediaWithInfo中保存图像时,Sony数码相机拍摄并传输到手机的图像返回nil。它会返回在iPhone上拍摄或从Internet下载的任何图像的图像。为什么这样做以及我该怎么做才能解决它?

allowsEditing设置为false。

   func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) {


    dismissViewControllerAnimated(true, completion: nil) //5

    var chosenImage = info[UIImagePickerControllerOriginalImage] as? UIImage //2

    let previewVC:ImagePreviewViewController = self.storyboard?.instantiateViewControllerWithIdentifier("PreviewVC") as! ImagePreviewViewController
    previewVC.imageToCrop = chosenImage!
    self.navigationController?.pushViewController(previewVC, animated: true)

}

更新 我发现这个问题与我的iCloud Photo Library同步有关,我选择了原始图像(.arw)而不是JPEG。原始图像返回nil

0 个答案:

没有答案