react-native-rectangle-doc-scanner 7.23.0 → 7.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -246,8 +246,10 @@ class CameraController(
|
|
|
246
246
|
val previewSizes = streamConfigMap.getOutputSizes(SurfaceTexture::class.java)
|
|
247
247
|
Log.d(TAG, "[CAMERA2] Available preview sizes: ${previewSizes?.take(10)?.joinToString { "${it.width}x${it.height}" }}")
|
|
248
248
|
|
|
249
|
-
//
|
|
250
|
-
|
|
249
|
+
// Match iOS photo preset behavior (4:3) when available for consistent FOV.
|
|
250
|
+
val targetPreviewAspect = 4.0 / 3.0
|
|
251
|
+
previewSize = chooseBestSize(previewSizes, targetPreviewAspect, null, preferClosestAspect = true)
|
|
252
|
+
?: chooseBestSize(previewSizes, viewAspect, null, preferClosestAspect = true)
|
|
251
253
|
?: previewSizes?.maxByOrNull { it.width * it.height }
|
|
252
254
|
Log.d(TAG, "[CAMERA2] Selected preview size: ${previewSize?.width}x${previewSize?.height}")
|
|
253
255
|
|