美文网首页
边缘阴影

边缘阴影

作者: baihualinxin | 来源:发表于2018-05-07 09:50 被阅读0次

    #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

    相关文章

      网友评论

          本文标题:边缘阴影

          本文链接:https://www.haomeiwen.com/subject/feiccxtx.html