Iphone 可以在iOS中的UIIimagePickerController中拍照前调整LED强度
我用Iphone 可以在iOS中的UIIimagePickerController中拍照前调整LED强度,iphone,ios,objective-c,uiimagepickercontroller,uislider,Iphone,Ios,Objective C,Uiimagepickercontroller,Uislider,我用UIImagePickerController打开相机,但我想在拍照之前,我可以调整LED的亮度。我认为如果可以在拍摄前将UISlider添加到UIImagePickerController以调整亮度LED是好的,但我不知道如何将UISlider添加到UIImagePickerController 你有什么想法吗?CGFloat亮度=0.5 UIGraphicsBeginImageContext(image.size) CGRect imageRect = CGRectMake(0, 0,
UIImagePickerController
打开相机,但我想在拍照之前,我可以调整LED的亮度。我认为如果可以在拍摄前将UISlider添加到UIImagePickerController
以调整亮度LED是好的,但我不知道如何将UISlider
添加到UIImagePickerController
你有什么想法吗?CGFloat亮度=0.5 UIGraphicsBeginImageContext(image.size)
CGRect imageRect = CGRectMake(0, 0, image.size.width, image.size.height);
CGContextRef context = UIGraphicsGetCurrentContext();
// Original image
[image drawInRect:imageRect];
// Brightness overlay
CGContextSetFillColorWithColor(context, [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:brightness].CGColor);
CGContextAddRect(context, imageRect);
CGContextFillPath(context);
UIImage* resultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
`You can change brightness overlay color to get proper results.`