react-native-rectangle-doc-scanner 3.97.0 → 3.98.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.
@@ -338,9 +338,14 @@ const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3
338
338
  const newRotation = (prev + degrees + 360) % 360;
339
339
  return newRotation;
340
340
  });
341
- console.log('[FullDocScanner] Starting image rotation...');
341
+ console.log('[FullDocScanner] Starting image rotation...', {
342
+ path: croppedImageData.path,
343
+ hasBase64: !!croppedImageData.base64,
344
+ });
345
+ // file:// prefix 제거
346
+ const cleanPath = croppedImageData.path.replace(/^file:\/\//, '');
342
347
  // ImageRotate를 사용해서 실제로 이미지 회전 (callback 기반)
343
- react_native_image_rotate_1.default.rotateImage(croppedImageData.path, degrees, async (rotatedImageUri) => {
348
+ react_native_image_rotate_1.default.rotateImage(cleanPath, degrees, async (rotatedImageUri) => {
344
349
  console.log('[FullDocScanner] Image rotated successfully:', rotatedImageUri);
345
350
  try {
346
351
  // rct-image-store:// URI를 base64로 변환
@@ -352,7 +357,7 @@ const FullDocScanner = ({ onResult, onClose, detectionConfig, overlayColor = '#3
352
357
  const base64String = reader.result;
353
358
  // "data:image/jpeg;base64," 부분 제거
354
359
  const base64Data = base64String.split(',')[1];
355
- console.log('[FullDocScanner] Converted to base64, length:', base64Data?.length);
360
+ console.log('[FullDocScanner] Converted rotated image to base64, length:', base64Data?.length);
356
361
  // 회전된 이미지로 교체 (base64 포함)
357
362
  setCroppedImageData({
358
363
  path: rotatedImageUri,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.97.0",
3
+ "version": "3.98.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -450,11 +450,17 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
450
450
  return newRotation;
451
451
  });
452
452
 
453
- console.log('[FullDocScanner] Starting image rotation...');
453
+ console.log('[FullDocScanner] Starting image rotation...', {
454
+ path: croppedImageData.path,
455
+ hasBase64: !!croppedImageData.base64,
456
+ });
457
+
458
+ // file:// prefix 제거
459
+ const cleanPath = croppedImageData.path.replace(/^file:\/\//, '');
454
460
 
455
461
  // ImageRotate를 사용해서 실제로 이미지 회전 (callback 기반)
456
462
  ImageRotate.rotateImage(
457
- croppedImageData.path,
463
+ cleanPath,
458
464
  degrees,
459
465
  async (rotatedImageUri: string) => {
460
466
  console.log('[FullDocScanner] Image rotated successfully:', rotatedImageUri);
@@ -471,7 +477,7 @@ export const FullDocScanner: React.FC<FullDocScannerProps> = ({
471
477
  // "data:image/jpeg;base64," 부분 제거
472
478
  const base64Data = base64String.split(',')[1];
473
479
 
474
- console.log('[FullDocScanner] Converted to base64, length:', base64Data?.length);
480
+ console.log('[FullDocScanner] Converted rotated image to base64, length:', base64Data?.length);
475
481
 
476
482
  // 회전된 이미지로 교체 (base64 포함)
477
483
  setCroppedImageData({