Advertisement
Guest User

Untitled

a guest
May 5th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. [stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error){
  2. @try {
  3. if (imageSampleBuffer != nil) {
  4. NSData *imageData = [AVCaptureStillImageOutput jpegStillImageNSDataRepresentation:imageSampleBuffer];
  5. UIImage *image = [[UIImage alloc] initWithData:imageData];
  6. [self setImageView:imageView1 withImage:image];
  7. }
  8. }@catch (NSException *exception) {
  9. }@finally {}
  10. }
  11.  
  12. captureSession.sessionPreset = AVCaptureSessionPresetHigh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement