react-native-rectangle-doc-scanner 3.212.0 → 3.213.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.
@@ -48,8 +48,6 @@ class CameraController(
48
48
 
49
49
  companion object {
50
50
  private const val TAG = "CameraController"
51
- private const val ANALYSIS_WIDTH = 1280
52
- private const val ANALYSIS_HEIGHT = 720
53
51
  }
54
52
 
55
53
  private data class LastFrame(
@@ -156,6 +154,7 @@ class CameraController(
156
154
 
157
155
  val rotation = previewView.display?.rotation ?: Surface.ROTATION_0
158
156
  preview = Preview.Builder()
157
+ .setTargetAspectRatio(AspectRatio.RATIO_4_3)
159
158
  .setTargetRotation(rotation)
160
159
  .build()
161
160
  .also {
@@ -164,8 +163,8 @@ class CameraController(
164
163
 
165
164
  imageAnalysis = ImageAnalysis.Builder()
166
165
  .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)
167
- .setTargetResolution(Size(ANALYSIS_WIDTH, ANALYSIS_HEIGHT))
168
166
  .setTargetRotation(rotation)
167
+ .setTargetAspectRatio(AspectRatio.RATIO_4_3)
169
168
  .setOutputImageFormat(ImageAnalysis.OUTPUT_IMAGE_FORMAT_YUV_420_888)
170
169
  .build()
171
170
  .also {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.212.0",
3
+ "version": "3.213.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",