我正在尝试将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似乎没有呈现图像......可能会发生什么?
答案 0 :(得分:6)
设置过滤器(或显示)链后,需要
[imageInput processImage];
将图像传播到过滤器链下并使其显示。