CIFilter output image nil

后端 未结 2 1180
隐瞒了意图╮
隐瞒了意图╮ 2020-12-03 22:24

I am using core image and I am applying a CIFilter sepia tone to my image. I run a filter once in viewDidLoad and then immediately call another function that adds the filter

2条回答
  •  旧巷少年郎
    2020-12-03 23:01

    You cannot call UIImage(CIImage:) and use that UIImage as the image of a UIImageView. UIImageView requires a UIImage backed by a bitmap (CGImage). A UIImage instantiated with CIImage has no bitmap; it has no actual image, it's just a set of instructions for applying a filter. That is why your UIImageView's image is nil.

提交回复
热议问题