Why AVCaptureSession output a wrong orientation?

Posted by Peter on Stack Overflow See other posts from Stack Overflow or by Peter
Published on 2010-08-24T23:14:00Z Indexed on 2010/12/25 23:54 UTC
Read the original article Hit count: 285

Hey guys,

So, I followed Apple's instructions to capture video session using AVCaptureSession: http://developer.apple.com/iphone/library/qa/qa2010/qa1702.html. One problem I'm facing is that even though the orientation of the camera / iphone device is vertical (and the AVCaptureVideoPreviewLayer shows a vertical camera stream), the output image seems to be in the landscape mode. I checked the width and height of imageBuffer inside imageFromSampleBuffer: of the sample code, and I got 640px and 480px respectively. Does anyone know why this's the case?

Thanks!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about avcapturesession