react-native-rectangle-doc-scanner 10.8.0 → 10.9.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.
@@ -101,8 +101,12 @@ class CameraController(
101
101
  Log.d(TAG, "[CAMERAX] TextureView visibility: ${textureView.visibility}")
102
102
  Log.d(TAG, "[CAMERAX] TextureView isAvailable: ${textureView.isAvailable}")
103
103
 
104
+ // Force portrait orientation (app is portrait-only)
105
+ val targetRotation = android.view.Surface.ROTATION_0
106
+ Log.d(TAG, "[CAMERAX] Setting target rotation to ROTATION_0 (portrait-only app)")
107
+
104
108
  preview = Preview.Builder()
105
- .setTargetResolution(android.util.Size(1920, 1080)) // 16:9 resolution
109
+ .setTargetRotation(targetRotation) // Force portrait
106
110
  .build()
107
111
  .also { previewUseCase ->
108
112
  Log.d(TAG, "[CAMERAX] Setting SurfaceProvider for TextureView...")
@@ -151,6 +155,7 @@ class CameraController(
151
155
  imageAnalyzer = ImageAnalysis.Builder()
152
156
  .setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)
153
157
  .setTargetResolution(android.util.Size(1280, 960)) // Limit resolution for analysis
158
+ .setTargetRotation(targetRotation) // Match preview rotation
154
159
  .build()
155
160
  .also {
156
161
  it.setAnalyzer(cameraExecutor) { imageProxy ->
@@ -165,6 +170,7 @@ class CameraController(
165
170
  // ImageCapture UseCase
166
171
  imageCapture = ImageCapture.Builder()
167
172
  .setCaptureMode(ImageCapture.CAPTURE_MODE_MAXIMIZE_QUALITY)
173
+ .setTargetRotation(targetRotation) // Match preview rotation
168
174
  .build()
169
175
 
170
176
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "10.8.0",
3
+ "version": "10.9.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",