我正在尝试运行void saveImageToLibrary
何时
[self.avSnapper captureStillImageAsynchronouslyFromConnection:captureConnection
completionHandler:handler];
已经完成了。我该怎么办?
我正在尝试运行void saveImageToLibrary
何时
[self.avSnapper captureStillImageAsynchronouslyFromConnection:captureConnection
completionHandler:handler];
已经完成了。我该怎么办?
我觉得这就是你想要的
[self.avSnapper captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error){
CFDictionaryRef exifAttachments = CMGetAttachment( imageSampleBuffer, kCGImagePropertyExifDictionary, NULL);
if (exifAttachments){
// Do something with the attachments if you want to.
NSLog(@"attachements: %@", exifAttachments);
}
else
NSLog(@"no attachments");
NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
UIImage *image = [[UIImage alloc] initWithData:imageData];
self.vImage.image = image;
}];