Preparing search index...
    • Opens the cropping interface for an existing image

      Allows users to manually crop an existing image file. Useful for editing images that have already been selected or captured.

      Parameters

      • uri: string

        File path or URI of the image to crop

      • themeColors: MD3Colors

        React Native Paper theme colors for UI consistency

      Returns Promise<string>

      Promise resolving to the file path of cropped image, or empty string if cancelled

      const { colors } = useTheme();
      const existingImagePath = "file:///path/to/image.jpg";
      const croppedPath = await cropImage(existingImagePath, colors);

      if (croppedPath) {
      console.log(`Image cropped: ${croppedPath}`);
      // Use the cropped image
      } else {
      console.log('User cancelled cropping');
      }