title: Can't set picture size when capturing image with AVFoundation
body: <p>I have a straightforward implementation of capturing a picture with a preview using AVFoundation: <a href="https://gist.github.com/1933313" rel="nofollow">https://gist.github.com/1933313</a></p>
  
  <p>Everything works perfectly except that my picture resolution is 304x400.</p>
  
  <p>My problems is that as soon as I try to change the default <code>sessionPreset</code> (line 16 &amp; 17) to something as small as <code>AVCaptureSessionPreset640x480</code> it stopes working: it reaches line 60 and the call to <code>[self.stillImageOutput captureStillImageAsynchronouslyFromConnection]</code> will throw the exception</p>
  
  <pre><code>'NSInvalidArgumentException', reason: '*** -[AVCaptureStillImageOutput captureStillImageAsynchronouslyFromConnection:completionHandler:] - inactive/invalid connection passed.'
  </code></pre>
  
  <p>because <code>- (AVCaptureConnection*)getConnection</code> will return nil (line 61)</p>
  
  <p>Anyone has any idea why this is happening ?</p>
  
  <p>PS: The device on which I test is an iPhone 3G running iOS 4.2.1</p>