android系统是11,品牌是redmi;我使用camerax拍照,有时宽度和高度为0;代码是
imageCapture.takePicture(ContextCompat.getMainExecutor(Application.appContext), new ImageCapture.OnImageCapturedCallback() {
@Override
public void onCaptureSuccess(@NonNull ImageProxy image) {
...
Log.i(TAG, "w " + image.getWidth() + " h " + image.getHeight());
...
}
@Override
public void onError(@NonNull final ImageCaptureException exception) {
...
}
});
暂无答案!
目前还没有任何答案,快来回答吧!