Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. AVAssetImageGenerator *imageGenerator = [[AVAssetImageGenerator alloc]initWithAsset:asset];
  2. CGImageRef stillImageRef = [imageGenerator copyCGImageAtTime:CMTimeMakeWithSeconds(CMTimeGetSeconds(asset.duration), asset.duration.timescale) actualTime:NULL error:NULL];
  3. UIImage *stillImage = [UIImage imageWithCGImage:stillImageRef];
  4.  
  5. - (void)captureOutput:(AVCaptureFileOutput *)captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connections error:(NSError *)error {
  6.  
  7. AVAsset *asset = [AVAsset assetWithURL:outputFileURL];
  8. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement