Convert CIImage to UIImage iOS swift.
Solution:
Here the below function was used to convert the CIImage to UIImage in XCode.
Here the below function was used to convert the CIImage to UIImage in XCode.
// MARK: - convert image
func convert(cimage:CIImage) -> UIImage
{
let context:CIContext = CIContext.init(options: nil)
let cgImage:CGImage = context.createCGImage(cmage, from: cmage.extent)!
let image:UIImage = UIImage.init(cgImage: cgImage)
return image
}
Comments
Post a Comment