如何使用 expo 图像选择器从图库中获取全尺寸照片

How to get the full size photo from gallery using expo image picker

我正在使用 image picker expo 访问我的画廊或照片。我想让未裁剪的完整照片显示在 image 上,这是我的代码:

const image = await ImagePicker.launchImageLibraryAsync({
        mediaTypes: ImagePicker.MediaTypeOptions.All,
        allowsEditing: true,
        aspect: [1, 1],
        quality: 1,
      });

      if (!image.cancelled) {
        setPickedImage(image.uri);
        setModalVisible(false);
      }
  };

我还没有找到如何使用库选项执行此操作,所以我只是创建了两个按钮,例如 Grop ImageWhole Image 并将 allowsEditing 作为 true 或 false 传递。所以用户必须事先决定是否要裁剪并按下相应的按钮。

尝试comments/deleteallowsEditing: true,