Preparing search index...

    Function pickAndCropImage

    • Opens the device's image gallery, then crops the selected photo

      Picks an uncropped image, then crops it through cropImage with the picked size so the result keeps full resolution without re-reading the source size on iOS.

      Parameters

      • themeColors: MD3Colors

        React Native Paper theme colors for UI consistency

      Returns Promise<string>

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

      const { colors } = useTheme();
      const croppedPath = await pickAndCropImage(colors);