#if 1GPUImageVignetteFilter *disFilter = [[GPUImageVignetteFilter alloc] init];//设置要渲染的区域[disFilter forceProcessingAtSize:inputImage.size];
[disFilter useNextFrameForImageCapture];//获取数据源GPUImagePicture *stillImageSource = [[GPUImagePicture alloc]initWithImage:inputImage];//添加上滤镜
[stillImageSource addTarget:disFilter];//开始渲染
[stillImageSource processImage];//获取渲染后的图片
UIImage*newImage = [disFilter imageFromCurrentFramebuffer];//加载出来UIImageView*imageView = [[UIImageViewalloc] initWithImage:newImage];
imageView.frame= CGRectMake(50,50,200,300);
[self.viewaddSubview:imageView];#endif
网友评论