Android Camera2 Output sizes

后端 未结 2 1762
执笔经年
执笔经年 2020-12-30 10:32

I have tested new Camera2 API on Android Lollipop. I want to fetch supported preview size:

StreamConfigurationMap streamConfigurationMap = cameraCharacterist         


        
2条回答
  •  长发绾君心
    2020-12-30 11:14

    replace

    Size[] sizes = streamConfigurationMap.getOutputSizes(SurfaceTexture.class);
    

    to

    Size[] sizes = streamConfigurationMap.getOutputSizes(ImageFormat.JPEG)
    

提交回复
热议问题