GPUImagePicture与GPUImageView目标?

时间:2014-03-10 14:35:03

标签: ios objective-c gpuimage

我正在尝试将GPUImagePicture的输出发送到GPUImageView

这或多或少是我的代码:

GPUImageView *backgroundImageView = [[GPUImageView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIImage *image = [UIImage imageNamed:@"photo"]; //The image is not nil
GPUImagePicture *imageInput = [[GPUImagePicture alloc] initWithImage:image];

[imageInput addTarget:backgroundImageView];
[self.view addSubview:backgroundImageView];

问题是backgroundImageView似乎没有呈现图像......可能会发生什么?

1 个答案:

答案 0 :(得分:6)

设置过滤器(或显示)链后,需要

[imageInput processImage];

将图像传播到过滤器链下并使其显示。