react-native-expo-cropper 1.2.41 → 1.2.42

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.
@@ -1243,6 +1243,15 @@ var ImageCropper = function ImageCropper(_ref) {
1243
1243
  });
1244
1244
  case 4:
1245
1245
  rotated = _context.v;
1246
+ // ✅ Send rotated image to backend: use rotated URI and dimensions so crop bbox matches
1247
+ sourceImageUri.current = rotated.uri;
1248
+ originalImageDimensions.current = {
1249
+ width: rotated.width,
1250
+ height: rotated.height
1251
+ };
1252
+ cameraFrameData.current = null; // rotated image is no longer "camera preview" frame
1253
+ imageSource.current = 'gallery'; // so layout callbacks run initializeCropBox() and show the white box
1254
+
1246
1255
  setPoints([]);
1247
1256
  hasInitializedCropBox.current = false;
1248
1257
  setImage(rotated.uri);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-expo-cropper",
3
- "version": "1.2.41",
3
+ "version": "1.2.42",
4
4
  "description": "Recadrage polygonal d'images.",
5
5
  "main": "index.js",
6
6
  "author": "PCS AGRI",
@@ -1048,6 +1048,15 @@ const rotatePreviewImage = async (degrees) => {
1048
1048
  }
1049
1049
  );
1050
1050
 
1051
+ // ✅ Send rotated image to backend: use rotated URI and dimensions so crop bbox matches
1052
+ sourceImageUri.current = rotated.uri;
1053
+ originalImageDimensions.current = {
1054
+ width: rotated.width,
1055
+ height: rotated.height,
1056
+ };
1057
+ cameraFrameData.current = null; // rotated image is no longer "camera preview" frame
1058
+ imageSource.current = 'gallery'; // so layout callbacks run initializeCropBox() and show the white box
1059
+
1051
1060
  setPoints([]);
1052
1061
  hasInitializedCropBox.current = false;
1053
1062
  setImage(rotated.uri);