0

I am currently building a react native project for iOS, and I am looking to having an image upload similar to what instagram used to have - only squares allowed. I am struggling to get there just from this.

I have been using expo-image-picker's launchImageLibraryAsync:

let result = await ImagePicker.launchImageLibraryAsync({
    quality: 1,
    aspect: [1, 1],
    allowsEditing: true,
});

if (!result.canceled) {
    this.setState({ image: result.assets[0] });
} else {
    this.setState({ image: null });
}

My idea is that this would enforce the 1:1 ratio, which I have found to work when the user zooms into their photo to select the portion of the image. However, I have found it to have problems when the user selects like in the image. I want to find some way that forces them to zoom in - every edge of the square must be filled in order for them to click choose.Example of where problems occur

0 Answers0