CIContext *context = [CIContext contextWithOptions:nil];
CIImage *inputImage = [[CIImage alloc] initWithImage:image];
CIFilter *filter = [CIFilter filterWithName:@"CIGaussianBlur"];
[filter setValue:inputImage forKey:kCIInputImageKey];
[filter setValue:[NSNumber numberWithFloat:10.0] forKey:@"inputRadius"];
CIImage *result=[filter outputImage];
CGImageRef cgImage = [context createCGImage:result fromRect:[inputImage extent]];
self.bgImageView.image = [UIImage imageWithCGImage:cgImage];;
图像虚拟化处理(图片背景虚拟化)
最新推荐文章于 2023-03-30 11:00:03 发布