react-native-image-crop-picker
react-native-image-crop-picker copied to clipboard
Force image to stay in portrait mode
Version
Tell us which versions you are using:
- react-native-image-crop-picker v0.24.1
- react-native v0.59.8
Platform
Tell us to which platform this issue is related
- Android
Expected behaviour
The image should always display in portrait mode. I am making a business card scanning app. After taking a picture I am sending the picture to google api for text recognition.
When the image is on portrait mode like below, google is able to recognize the texts correctly:
But when the image is on landscape mode like below, google is not able to recognize anything. Weird right?
The thing is that the orientation is changed automatically after clicking the picture in the preview screen where Discard and Save buttons appear. Sometimes it's displayed as the first image and sometimes it's displayed as the second image.
So how do it make it to always display it like the first image so that after sending the image I get a correct response back from google.
If this is not an issue with the package then can someone help me out to fix it?
Actual behaviour
The image orientation is sometimes changed to landscape mode automatically.
It happens to me too, you found a fix?
Nope. No luck yet.
i had solved the problem,use react-native-image-picker and it has a params,called 'rotation' . rotation set to 90, the image it takes will always in portrait mode . then you can take the image'uri to react-native-image-crop- picker's cropper trust me it works
i had solved the problem,use react-native-image-picker and it has a params,called 'rotation' . rotation set to 90, the image it takes will always in portrait mode . then you can take the image'uri to react-native-image-crop- picker's cropper trust me it works
const res = await ImagePicker.openCamera({ mediaType: 'photo', cropping: false, includeBase64: true, compressImageQuality: 0.5, rotation:90 })
Still base64 picture is rotated when I take picture in portrait mode