ImagePicker.launchCameraAsync sets wrong image ratio

When taking a photo with ImagePicker.launchCameraAsync, returned image object always has horizontal dimensions, even the photo is vertical, which results the photo being flattened. The issue was found only on Android phones, iOS is ok. The problem also persists when taking pictures with front camera.

Object {
“cancelled”: false,
“height”: 2988, - should be swapped with width
“type”: “image”,
“uri”: “file:/data/user/0/host.exp.exponent/cache/ExperienceData/%2540vaclav.ryska%252FtestApp2/ImagePicker/b87b4292-df67-4e45-acb3-467906c65635.jpg”,
“width”: 5312, - should be swapped with height
}

Hey @vaclav.ryska, can you let me know what SDK version you are running as well as share the code you are running to get the returned object you pasted above?

Cheers,
Adam

Issue solved. The problem occurs only when quality prop is set to 1, when set to 0.9, everything works fine…

var result = await ImagePicker.launchCameraAsync({
            mediaTypes: ImagePicker.MediaTypeOptions.Images,
            quality: Constants.platform.iOs ? 0 : 0.9,
        });

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.