Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVFoundation capture UIImage

I'm trying to capture one or more UIImages programmatically using AVFoundation. I set up the sessions and input devices and everything, but when I try to find explanations on how to actually take the photos, all I get is buffeled information about connections and what not. I couldn't find a single example of actually taking photos and saving it to UIImage for further processing. All the example use a constant kCGImagePropertyExifDictionary Which doesn't seems to exist in iOS 5 SDK..

Can someone please provide me with a code or an explanation from top to bottom on how to take and save an image from the front facing camera to a UIImage using AVFoundation?

Thanks alot!

like image 821
La bla bla Avatar asked Apr 12 '12 00:04

La bla bla


1 Answers

To use kCGImagePropertyExifDictionary, you should #import <ImageIO/ImageIO.h>.

All of the other information you seek is inside the AVFoundation Programming guide - particularly the Media Capture section.

like image 128
Chris McGrath Avatar answered Sep 27 '22 22:09

Chris McGrath