我尝试将CIFilter
应用于CGImageRef
,但似乎没有这样做。
CGImageRef image = _image;
CIFilter *filter = [CIFilter filterWithName @"CISephiaTone" keysAndValues:kCIInputImageKey, image, @"inputItensity", @0.8, nil];
CGImageRef outputImage = (__bridge CGImageRef)([filter valueForKey:kCIOutputImageKey]);
有谁知道如何将滤镜应用于图像参考并将输出图像传递给drawRect方法?
我也试过CGImageRef outputImage = [filter outputImage]
。但编译器不知道outputImage
?