Unable to convert CIImage to UIImage in Swift 3.0

后端 未结 3 520
栀梦
栀梦 2020-12-10 02:49

I am making image form QR Code by using following code:

  func createQRFromString(str: String) -> CIImage? {
        let stringData = str.dat         


        
3条回答
  •  醉梦人生
    2020-12-10 03:26

     func convert(image:CIImage) -> UIImage
     {           
        let image:UIImage = UIImage.init(ciImage: image)        
        return image
     }
    

    Perhaps, this was unavailable before, but it is now possible to create UIImages directly from CIImage.

提交回复
热议问题