我正在尝试将 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 似乎没有渲染图像...可能发生了什么?
最佳答案
设置过滤器(或显示)链后,您需要
[imageInput processImage];
将图像传播到过滤器链并使其显示。
关于ios - GPUImagePicture 与 GPUImageView 目标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22303101/