Wednesday, 22 December 2021

react-native-image-picker getting reverse height and width

I am using react-native-image-picker library to capture image code as follow:

launchImageLibrary({
   includeExtra: false,
   mediaType: "photo",
   selectionLimit: 0,
   quality: 1,
   maxWidth: 1000,
   maxHeight: 1500
}, (res)=>{
   console.log(res);
});

When I am taking capture using android real device(portrait) getting image with following:

{
   uri: "string",
   height: 1000,
   width: 750
}

If i take picture using android real device(landscape) works get correction height and width as below:

{
   uri: "string",
   height: 750,
   width: 1000
}

can someone help me out?



from react-native-image-picker getting reverse height and width

No comments:

Post a Comment