繁体   English   中英

尝试将图像调整为缩略图大小,kCGInterpolationHigh出现错误“使用未解析的标识符”

[英]Trying to resize an image to a thumbnail, getting error “Use of unresolved identifier” for kCGInterpolationHigh

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

使用未解决的标识符

对于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)

}
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM