Android-Image-Cropper
Android-Image-Cropper copied to clipboard
[BUG] - Image Rotates after clicking image via camera on lower Android versions
- Lib Version [4.3.1]
Describe the bug The image taken via camera rotates (-90 degrees) after being captured. I've tried this with and without intent chooser. I've tried in on an emulator because that's where we do tests.
Happens on API level 26. Android 8 (Oreo). Not happening on Android 11. Might be happening on other API levels too. I haven't tested
To Reproduce Steps to reproduce the behavior:
- Go to main screen of sample app.
- Click on the 3rd button "Sample calling cropimage"
- Now in the next screen click on the 2nd button "Calling library directly with URI".
- Choose camera.
- Click an image
- Notice after capturing the image, it is rotated by -90 degrees.
Expected behavior On clicking an image via camera the image shouldn't rotate.
Media
Smartphone (please complete the following information):
- Device: Android Studio Emulator with Pixel 2 configuration
- OS: Android 8 (Oreo) Api Level 26
Additional context I might be a little busy but if I get time I will try to look into it and open a PR. I think this is what @Jeyaseelan2528 meant in issue #292
Hey @Devenom1 thanks for the detailed PR, helps a lot.
I try to reproduce, but could not, so maybe is a specific case of brand/os. Will try with the simulator you use later.
but from your video and steps
Notice after capturing the image, it is rotated by -90 degrees.
This may not be the library, but the camera itself. Could you try to open the camera app and take a picture so we check if will rotate too? Because taking the picture before we accept is the device camera working, not the lib 🤔
Hey @Canato thanks for the quick response as always.
Here is a video from the default camera app on the android studio emulator. It doesn't rotate with the default camera app.
I remember facing this issue before when I made a local copy of the Arthur Hub Library. I had fixed this issue on that but now I've deleted that and I'm too lazy to check my changes on github. It was a mess. I switched to CanHub library completely.
This is also probably related to #439 where handling exif values is buggy
Could you please try the latest release, 4.4.0 and reopen this issue if it still persists?