问题
I am using Camera2 API for my creating camera using Android Studio 2.3.May I ask if it is possible to set a fixed camera resolution into my camera? And if it is possible how can I set a fixed camera resolution? I'm really new to camera2 and android studio. I hope someone can help me. Thank you very much.
回答1:
Yes, you can use fixed resolution. Only don't run this APK on devices that don't support this camera resolution.
For example,
InputConfiguration inputConfiguration = new InputConfiguration(640, 480, ImageFormat.YUV_420_888);
cameraDevice.createReprocessableCaptureSession(inputConfiguration, outputs, callback, handler);
来源:https://stackoverflow.com/questions/48779655/camera2-set-fixed-resolution