gpt4 book ai didi

ios - 尝试将图像调整为缩略图,kCGInterpolationHigh 出现错误 "Use of unresolved identifier"

转载 作者:可可西里 更新时间:2023-11-01 01:00:02 25 4
gpt4 key购买 nike

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

Use of unresolved identifier

对于 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 - 尝试将图像调整为缩略图,kCGInterpolationHigh 出现错误 "Use of unresolved identifier",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35687871/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com