GPUImage仍然是相机..white屏幕

时间:2013-12-17 07:29:02

标签: ios gpuimage

我有一台iPad 2,我在我的viewDidLoad中测试这段代码我称之为

-(void)stillCameraStart{
GPUImageStillCamera *stillCam=[[GPUImageStillCamera alloc]init];
GPUImageView *filterView = [[GPUImageView alloc] initWithFrame:CGRectMake(0.0, 0.0,768, 1024)];
GPUImageGammaFilter *filter = [[GPUImageGammaFilter alloc] init];

[stillCam addTarget: filter];
[filter addTarget: filterView];
[stillCam startCameraCapture];
}

但我得到的只是白色屏幕。我做错了什么?我期待相机启动

1 个答案:

答案 0 :(得分:1)

你错过了这个陈述吗?

[self.view addSubview:filterView];