Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/96.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 试图将图像调整为缩略图,出现错误“0”;未解析标识符的使用“;对于kCGInterpolationHigh_Ios_Swift_Uiimage_Interpolation - Fatal编程技术网

Ios 试图将图像调整为缩略图,出现错误“0”;未解析标识符的使用“;对于kCGInterpolationHigh

Ios 试图将图像调整为缩略图,出现错误“0”;未解析标识符的使用“;对于kCGInterpolationHigh,ios,swift,uiimage,interpolation,Ios,Swift,Uiimage,Interpolation,尝试使用以下代码将图像大小调整为缩略图,出现错误: 未解析标识符的使用 对于kCGInterpolationHigh @IBAction func dropPhoto(sender: AnyObject) { presentViewController(imagePicker, animated: true, completion: nil) } func imagePickerController(picker: UIImagePickerController, didFinishPi

尝试使用以下代码将图像大小调整为缩略图,出现错误:

未解析标识符的使用

对于
kCGInterpolationHigh

@IBAction func dropPhoto(sender: AnyObject) {
    presentViewController(imagePicker, animated: true, completion: nil)
}
func imagePickerController(picker: UIImagePickerController, didFinishPickingImage image: UIImage, editingInfo: [String : AnyObject]?) {
    self.dismissViewControllerAnimated(true, completion: nil)

    let thumbnail = image.resizedImageWithContentMode(UIViewContentMode.ScaleAspectFit, bounds: CGSizeMake(400, 400), interpolationQuality: kCGInterpolationHigh)
    let imgData = UIImagePNGRepresentation(thumbnail)

}
}

在iOS 9+中使用
CGInterpolationQuality.High
而不是
kCGInterpolationHigh

参考: