Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6823825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:49:46+00:00 2026-05-26T21:49:46+00:00

My goal is to write a custom camera view controller that: Can take photos

  • 0

My goal is to write a custom camera view controller that:

  1. Can take photos in all four interface orientations with both the back and, when available, front camera.
  2. Properly rotates and scales the preview “video” as well as the full resolution photo.
  3. Allows a (simple) effect to be applied to BOTH the preview “video” and full resolution photo.

My previous effort is documented in this question. My latest attempt was to modify Apple’s sample GLVideoFrame (from WWDC 2010). However, I have not been able to get the iPhone 4 to display the preview “video” properly when the session preset is AVCaptureSessionPresetPhoto.

Has anyone tried this or know why the example doesn’t work with this preset?

Apple’s example uses a preset with 640×480 video dimensions and a default texture size of 1280×720. The iPhone 4 back camera delivers only 852×640 when the preset is AVCaptureSessionPresetPhoto.

iOS device camera video/photo dimensions when preset is AVCaptureSessionPresetPhoto:

  • iPhone 4 back: video is 852×640 & photos are 2592×1936
  • iPhone 4 front: video & photos are 640×480
  • iPod Touch 4G back: video & photos are 960×720
  • iPod Touch 4G front: video & photos are 640×480
  • iPhone 3GS: video is 512×384 & photos are 2048×1536

Update

I got the same garbled video result when switching Brad Larson’s ColorTracking example (blog post) to use the AVCaptureSessionPresetPhoto.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:49:46+00:00Added an answer on May 26, 2026 at 9:49 pm

    The issue is that AVCaptureSessionPresetPhoto is now context-aware and runs in different resolutions based on whether you are displaying video or still image captures.

    The live preview is different for this mode because it pads the rows with extra bytes. I’m guessing this is some sort of hardware optimization.

    In any case, you can see how I solved the problem here:

    iOS CVImageBuffer distorted from AVCaptureSessionDataOutput with AVCaptureSessionPresetPhoto

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to write a custom camera view controller that: Can take photos
my goal is to write a stored proc that can collect all field values
Goal: write a query that can bring back all the users of a company,
My final goal is to write the program which can run on the Unix
My goal is to create some kind of swing component that can do two
My goal is to write a program that handles an arbitrary number of tasks
My goal is to write some sort of chatterbot that speaks in spanish. I've
I'm trying to write a custom command that works outside of Django projects. I
Goal I'm trying to load a custom class that contains a Texture2D from an
I'd like write a custom type conversion Category in Groovy. The goal is to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.