react-native-rectangle-doc-scanner 3.217.0 → 3.218.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.
@@ -157,20 +157,20 @@ class CameraController(
157
157
 
158
158
  val rotation = previewView.display?.rotation ?: Surface.ROTATION_0
159
159
 
160
- // Build Preview and set surface provider BEFORE binding
160
+ // Build Preview with lower resolution to reduce HAL load
161
161
  preview = Preview.Builder()
162
- .setTargetAspectRatio(AspectRatio.RATIO_4_3)
162
+ .setTargetResolution(Size(1280, 720))
163
163
  .setTargetRotation(rotation)
164
164
  .build()
165
165
  .also {
166
166
  it.setSurfaceProvider(previewView.surfaceProvider)
167
167
  }
168
168
 
169
- // Build ImageAnalysis
169
+ // Build ImageAnalysis with lower resolution
170
170
  imageAnalysis = ImageAnalysis.Builder()
171
171
  .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)
172
172
  .setTargetRotation(rotation)
173
- .setTargetAspectRatio(AspectRatio.RATIO_4_3)
173
+ .setTargetResolution(Size(1280, 720))
174
174
  .setOutputImageFormat(ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888)
175
175
  .build()
176
176
  .also {
@@ -192,9 +192,9 @@ class CameraController(
192
192
  imageAnalysis
193
193
  )
194
194
  analysisBound = true
195
- Log.d(TAG, "[CAMERAX-FIX-V2] Camera and analysis bound successfully")
195
+ Log.d(TAG, "[CAMERAX-FIX-V3] Camera bound with lower resolution")
196
196
  } catch (e: Exception) {
197
- Log.e(TAG, "[CAMERAX-FIX-V2] Failed to bind camera use cases", e)
197
+ Log.e(TAG, "[CAMERAX-FIX-V3] Failed to bind camera use cases", e)
198
198
  analysisBound = false
199
199
  }
200
200
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.217.0",
3
+ "version": "3.218.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",