辅助函数

main
Matthew 6 months ago
parent b03d2d729c
commit 3841f3c5e6

@ -1006,6 +1006,15 @@ public class Camera2RawFragment extends Fragment
}
}
private Size getLargestResolution(StreamConfigurationMap map, int format) {
Size[] resolutions = map.getHighResolutionOutputSizes(format);
if (resolutions == null || resolutions.length == 0) {
resolutions = map.getOutputSizes(format);
}
Size largestJpeg = Collections.max(Arrays.asList(resolutions), new CompareSizesByArea());
return largestJpeg;
}
/**
* Configure the necessary {@link android.graphics.Matrix} transformation to `mTextureView`,
* and start/restart the preview capture session if necessary.

Loading…
Cancel
Save