使用GPUImage,但希望在进入GPUImage之前调整相机上的温度。据我所知,这是“非法的”,但我宁愿看到它工作,并抓住我的机会。
我的代码:
stillCamera = [[GPUImageStillCamera alloc] init];
stillCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
AVCaptureDevice *device = stillCamera.inputCamera;
NSError *error;
if ([device lockForConfiguration:&error]) {
[device setWhiteBalanceMode:AVCaptureWhiteBalanceModeLocked];
[device performSelector:@selector(setWhiteBalanceTemperature:) withObject:[NSNumber numberWithFloat:0.9]];
[device unlockForConfiguration];
}不知道我在这里错过了什么
发布于 2014-04-02 00:12:39
删除该行:
[device setWhiteBalanceMode:AVCaptureWhiteBalanceModeLocked];它会起作用的。但只是在某种程度上--你会发现除了“非常酷”之外的任何设置都很难接受,我怀疑……(并不是所有Apple的私有API都能以您期望的方式工作。或者,实际上,根本不是。
https://stackoverflow.com/questions/21888981
复制相似问题