9
AVFoundation 및 ImageIO 구현을 통해 내 응용 프로그램에서 사진을 처리했습니다. 나는 그것에 문제가있다. 플래시가 꺼지더라도 찍은 이미지는 항상 어둡습니다. 다음은 내가 사용하는 코드입니다.AVCaptureOutput은 플래시 사용시에도 어두운 사진을 촬영합니다.
[[self currentCaptureOutput] captureStillImageAsynchronouslyFromConnection:[[self currentCaptureOutput].connections lastObject]
completionHandler:^(CMSampleBufferRef imageDataSampleBuffer, NSError *error) {
[[[blockSelf currentPreviewLayer] session] stopRunning];
if (!error) {
NSData *data = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageDataSampleBuffer];
CGImageSourceRef source = CGImageSourceCreateWithData((CFDataRef) data, NULL);
if (source) {
UIImage *image = [blockSelf imageWithSource:source];
[blockSelf updateWithCapturedImage:image];
CFRelease(source);
}
}
}];
이미지에 플래시가 포함되지 않았습니까?
어떻게 할 수 있습니까? adjustmentExposure와 adjustmentWhiteBalance를 모두 관찰하면 captureStillImageAsynchronouslyFromConnection을 정확히 호출해야합니까? 스트레이트 from observeValueForKeyPath? – grzaks
그 방법을 찾았습니까? 왜냐하면 나는 지금 내 아이폰 6에서 똑같은 문제를 겪고 있기 때문이다. – Sebastien