我有一个白色闪光灯,它似乎提醒用户已经拍摄了一张照片,但白色闪光灯不会给我的照片增加光线。不管我做了什么,我的照片仍然是暗的。我已经改变了闪光灯的持续时间,并在闪光灯后移动[[self captureManager] captureStillImage];拍照,但仍然没有运气。我看过我的Macbook上的照相亭应用程序,似乎闪光灯在图像被捕捉之前出现了一点,它为黑暗中的照片提供了光线。我想复制这个。有谁可以帮我?
- (IBAction)captureStillImage2:(id)sender
{
// Capture a still image
[[self stillButton] setEnabled:NO];
// Flash the screen white and fade it out to give UI feedback that a still image was taken
UIView *flashView = [[UIView alloc] initWithFrame:[[self videoPreviewView] frame]];
[flashView setBackgroundColor:[UIColor whiteColor]];
[[[self view] window] addSubview:flashView];
[UIView animateWithDuration:1.0f
animations:^{
[[self captureManager] captureStillImage];
[flashView setAlpha:0.f];
}
completion:^(BOOL finished){
[flashView removeFromSuperview];
[flashView release];
}
];
}发布于 2013-02-04 20:51:24
尝试使用类似于iOS5+的[[UIScreen mainScreen] setBrightness:1.0];来增加亮度。
但请记住,在像iphone这样的小屏幕上的效果将无法与全尺寸macbook pro的效果相提并论(这都是关于brightness和backlit 的)。
https://stackoverflow.com/questions/14686463
复制相似问题