react-native-rectangle-doc-scanner 3.189.0 → 3.191.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.
|
@@ -111,8 +111,8 @@ class CameraController(
|
|
|
111
111
|
// Preview use case
|
|
112
112
|
Log.d(TAG, "[BIND] Creating Preview use case...")
|
|
113
113
|
val preview = Preview.Builder()
|
|
114
|
-
// Use
|
|
115
|
-
.
|
|
114
|
+
// Use a modest fixed size to avoid stream configuration timeouts on some devices.
|
|
115
|
+
.setTargetResolution(Size(960, 720))
|
|
116
116
|
.setTargetRotation(targetRotation)
|
|
117
117
|
.build()
|
|
118
118
|
Log.d(TAG, "[BIND] Preview created: $preview")
|
|
@@ -121,10 +121,8 @@ class CameraController(
|
|
|
121
121
|
Log.d(TAG, "[BIND] Creating ImageCapture use case...")
|
|
122
122
|
imageCapture = ImageCapture.Builder()
|
|
123
123
|
.setCaptureMode(ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY)
|
|
124
|
-
// Use aspect ratio to avoid unsupported size combinations on some devices.
|
|
125
|
-
.setTargetAspectRatio(AspectRatio.RATIO_4_3)
|
|
126
124
|
// Cap resolution to avoid camera session timeouts on lower-end devices.
|
|
127
|
-
.setTargetResolution(Size(
|
|
125
|
+
.setTargetResolution(Size(960, 720))
|
|
128
126
|
.setTargetRotation(targetRotation)
|
|
129
127
|
.setFlashMode(ImageCapture.FLASH_MODE_AUTO)
|
|
130
128
|
.build()
|
|
@@ -134,8 +132,6 @@ class CameraController(
|
|
|
134
132
|
imageAnalysis = if (enableDetection) {
|
|
135
133
|
Log.d(TAG, "[BIND] Creating ImageAnalysis use case...")
|
|
136
134
|
ImageAnalysis.Builder()
|
|
137
|
-
// Use aspect ratio to avoid unsupported size combinations on some devices.
|
|
138
|
-
.setTargetAspectRatio(AspectRatio.RATIO_4_3)
|
|
139
135
|
// Keep analysis lightweight to prevent session configuration timeouts.
|
|
140
136
|
.setTargetResolution(Size(960, 720))
|
|
141
137
|
.setTargetRotation(targetRotation)
|
package/package.json
CHANGED