views:

270

answers:

1

Hi all, I am curious about the new APIs for iPhone iOS: AVCapture... Does this include a documented way to grab a screenshot of the camera preview? The doc seems a bit confusing to me, and since it is out of NDA now, I thought I would post my question here. Many thanks, Brett

+1  A: 

With AVFoundation you can grab photos from the camera session...The way it works is you use one of the subclasses of AVCaptureOutput in order to get what you need, for still images you are going to want to use the AVCaptureSTillImageOutput subclass, here is a link AVCaptureStillImageOutput ref. Besides that you also have AVCaptureMovieFileOutput which is used to record a quicktime movie from the capture session to a file, AVCaptureVideoDataOutput which allows you to intercept uncompressed individual frames from the capture session, you also have audio outputs which you can use as well...hope this helps

Daniel
Thanks for the info. I am still a little confused. Is the AVCaptureStillImageOutput a replacement for the [UIImagePickerController takePicture]? Or does it just grab what is in the camera preview?
Brett
Well they have nothgin to do with each other...one is AVFoundation the other one is UI Kit, the UIImagePIckerController is an interface provided by apple for taking video and pictures, with AVFoundation you can make your own and have a lot more control over the camera settings and full control of how the interface looks and feels etc
Daniel