Below is a very small gitHub project for image cropping from camera pic or gallery pic.
So, on the android java side it is using the ‘edmodo’ image cropper library-
com.theartofdev.edmodo.cropper
But it is crashing when cropping from camera. Gallery image cropping is working correctly. Only problem is with camera.
Camera cropping is working fine on Android 10 and 6
Camera cropping not working (crashing) on Android 11 and 12
This is the android java app –
https://github.com/syed-nw/image-cropper
This is the library code –
(com.theartofdev.edmodo.cropper) –
https://github.com/ArthurHub/Android-Image-Cropper/tree/master/cropper/src/main/java/com/theartofdev/edmodo/cropper
How do I make camera crop to work on latest android 11 and 12 and even later ???