Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You might be confusing the terms, there are two possible ways to interpret your question, the first is that you have the full screen size of the phone, and you somehow want to just capture a part of the screen. The second is that you want the taken picture to have 320 x 320 source resolution.</p> <p>The first thing you have to understand is how the media capture.</p> <p>On the iPhone there are 4 possible outputs:</p> <ul> <li><strong>AVCaptureMovieFileOutput</strong> to output to a movie file</li> <li><strong>AVCaptureVideoDataOutput</strong> if you want to process frames from the video being captured </li> <li><strong>AVCaptureAudioDataOutput</strong> if you want to process the audio data being captured </li> <li><strong>AVCaptureStillImageOutput</strong> if you want to capture still images with accompanying metadata</li> </ul> <p>This means you can only get something through these outputs, for your purpose you can use either the <strong>AVCaptureStillImageOutput</strong> or the <strong>AVCaptureVideoDataOutput</strong>.</p> <p>The suggestions that others have given you use the <strong>AVCaptureStillImageOutput</strong>. This is probably the easiest you should try. Here you can try one of these:</p> <ol> <li><p>You can take the full screen, and crop what you want, here you would probably have the quality set for <strong>Photo</strong> Which gives you the full screen image with the highest quality (2592x1936 for the iphone 4 for example).</p></li> <li><p>You change the capture quality to <strong>Medium</strong> which will take a picture with 480x360 pixels (on the iphone4) and ALSO resize the video preview layer to something the appropriate size so that it does not look so pixelated for the user. I think this is what you are looking for, since the preview layer is technically a view you can show it wherever you want on the iphone screen, and since you have lowered the quality of the input the pictures will be taken in the resolution that you set, so it should allow the pictures to be taken much more rapidly and using a lot less memory.</p></li> </ol> <p>Now there is another path for this, you can process the frames directly of a video input of <strong>AVCaptureVideoDataOutput</strong>, this one is a bit more complicated since you have to set your delegate to receive the frame with your desired quality and take the resolution you want, then process this frame so that it can be used.</p> <p>SOMETHING VERY IMPORTANT is that these presets are phone dependent, they will change depending on the phone current specs, I do not know if you can ask the camera for a custom preset but I believe you cant. </p> <p>You can see more about this in the official apple documentation. </p> <p><a href="http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW2" rel="noreferrer">http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/04_MediaCapture.html#//apple_ref/doc/uid/TP40010188-CH5-SW2</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload