Closed MohNage7 closed 5 years ago
Hello.
I don't know your status.
can you give me more information?
I am having the same issue
Solved by using imageCropView.setImageFilePath(path);
instead of imageCropView.setImageURI(imageUri);
This is not actually a solution. We have setImageURI() method and it doesn't work correctly with imageCropView.
@Altair1908: I encountered the same problem and I found a (dirty & hack) solution.
Before importing the Uri with setImageURI(imageUri) I placed these lines:
ImageView imageView = findViewById(R.id.ivInvisible);
imageView.setImageURI(result);
BitmapDrawable drawable = (BitmapDrawable) imageView.getDrawable();
Bitmap bitmap = drawable.getBitmap();
imageCropView.setImageBitmap(bitmap);
To get this to work I needed to place an "invisible" regular ImageView in the XML-file:
<ImageView
android:id="@+id/ivInvisible"
android:layout_width="0dp"
android:layout_height="0dp"/>
Greetings Michael
Hello first of all thanks for the library . i'm having this issue when i'm trying to use the code below
Bitmap bitmap = mCropView.getCroppedImage();
java.lang.ClassCastException: com.bumptech.glide.request.target.SquaringDrawable cannot be cast to com.naver.android.helloyako.imagecrop.view.graphics.FastBitmapDrawable at com.naver.android.helloyako.imagecrop.view.ImageCropView.getViewBitmap(ImageCropView.java:951) at com.naver.android.helloyako.imagecrop.view.ImageCropView.getCropInfo(ImageCropView.java:938) at com.naver.android.helloyako.imagecrop.view.ImageCropView.getCroppedImage(ImageCropView.java:921)