Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AVAssetImageGenerator *imageGenerator = [[AVAssetImageGenerator alloc]initWithAsset:asset];
- CGImageRef stillImageRef = [imageGenerator copyCGImageAtTime:CMTimeMakeWithSeconds(CMTimeGetSeconds(asset.duration), asset.duration.timescale) actualTime:NULL error:NULL];
- UIImage *stillImage = [UIImage imageWithCGImage:stillImageRef];
- - (void)captureOutput:(AVCaptureFileOutput *)captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connections error:(NSError *)error {
- AVAsset *asset = [AVAsset assetWithURL:outputFileURL];
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement