0

I work with camera2API and when i try to get all possible resolutions with this standard method

Size[] sizes = map.getOutputSizes(ImageFormat.JPEG);

            for (int i = 0; i < sizes.length; i++){
                Size size = sizes[i];
                Logger.logGeneral("Sizes " + i + " :" + " Width : " + size.getWidth() + " Height : " + size.getHeight());
            }

i get such output

E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 0 : Width : 3264 Height : 2448
E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 1 : Width : 3264 Height : 1836
E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 2 : Width : 2048 Height : 1152
E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 3 : Width : 1920 Height : 1080
E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 4 : Width : 1280 Height : 720
E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 5 : Width : 960 Height : 720
E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 6 : Width : 640 Height : 480
E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 7 : Width : 320 Height : 240
E/GENERAL: [ActivityCamera::setUpCameraOutputs::406]:: Sizes 8 : Width : 256 Height : 144

but it is not entire... When i open defoult camera i can chose more hight resolution

enter image description here

But why i can't get it all in my standard method?

Actually i notice this issue with Samsung S6, my Meizu MX5 show me all list of resolution.

What am i doing wrong?

Sirop4ik
  • 4,543
  • 2
  • 54
  • 121
  • "What am i doing wrong?" -- perhaps nothing. The camera app that ships with the device can use private APIs, available only to the device manufacturer. Try a few third-party camera apps and see if they report this higher resolution. – CommonsWare Oct 09 '16 at 18:10
  • I am afraid that camera2 implementation on Samsung S6 is crippled. If you use the (deprecated) old camera API, you will see the 16M mode and other resolutions. – Alex Cohn Oct 09 '16 at 20:42
  • @CommonsWare Maybe you know how to solve my issue, how can i take a picture only when camera in focus? There is my question http://stackoverflow.com/questions/40185407/how-to-take-picture-only-if-image-in-focus-camera-2-api Thanks in advance! – Sirop4ik Oct 22 '16 at 10:28
  • 1
    @AlexCohn Maybe you know how to solve my issue, how can i take a picture only when camera in focus? There is my question http://stackoverflow.com/questions/40185407/how-to-take-picture-only-if-image-in-focus-camera-2-api Thanks in advance! – Sirop4ik Oct 22 '16 at 10:29

0 Answers0