Closed salmanhameed2018 closed 5 years ago
Hello.
Did you compare paths from camera and SD card?
Path is parameter in imageCropView.setImageFilePath(path);
Can you tell me paths both?
yes sure,
for camera: /storage/emulated/0/Android/data/photoblender.kotlin.thetamobile.com.photoblender/files/Pictures/JPEG_20190107_141900_1962870013120570186.jpg
for gallery: content://media/external/images/media/3758
You have to convert content uri to file path.
ref. https://stackoverflow.com/questions/3401579/get-filename-and-path-from-uri-from-mediastore
ps. I think it's better to convert convert uri to file path in this library. However, I don't know When I can update that feature.
thanks, below solution works for me,
var bitmapPath:String = intent.getStringExtra(SELECTED_IMAGE_PATH) val bitmap = MediaStore.Images.Media.getBitmap(this.contentResolver, Uri.parse(bitmapPath)) iv_selected_crop_image.setImageBitmap(bitmap)
I am glad problem is solved
Hello, I'm using your library for my latest project, the source of my images is from the camera and SD card, when I use images for cropping from camera it works well, but crashes when my source is an SD card, please help me out,
NOTE: I HAVE APPLY THIS SOLUTION (https://github.com/naver/android-imagecropview/issues/28)
here is the crash.
java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable cannot be cast to com.naver.android.helloyako.imagecrop.view.graphics.FastBitmapDrawable