4s front-facing camera call

Source: Internet
Author: User

Recently made a snapshot of the function needs to call the front-facing camera, on the 5s,6s,6plus can be called normally, but the call on the 4s camera will appear white. Began to think is the cause of the phone, then Baidu 4s before and after the camera pixel, found the front camera pixel is very low, so guess will be related to pixels. Find the code to adjust the pixel and modify it, the code is as follows:

_capturesession.sessionpreset=avcapturesessionpreset1280x720;

if (is_iphone_4s)

{

/*4s the resolution of the front camera is too low, the corresponding setting is also lower to output the screen */

_capturesession.sessionpreset = avcapturesessionpreset640x480;

}

Then you can shoot it normally. (Welcome to the vomit Groove)

4s front-facing camera call

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.