android-imagecropview
android-imagecropview copied to clipboard
ClassCastException in getViewBitmap()
If I set a source like this,
cropView.setImageResource(R.drawable.ic_launcher)
And, set crop portion like this,
cropView.setAspectRatio(1, 1)
And, then, get crop-info like this,
cropView.getCropInfo()
It crashes with Bitmap can't be cast to FastBitmapDrawable.
Hi, @rupinderjeet
I'm sorry. Actually this library is supporting only setImageFilePath method for image load.
setImageResource is not supported.
I need to update Usage in README.md
Thank you.
You should instead throw an exception in these methods if they aren't supported. If someone calls setImageResource throw execption to tell user to not use this method.
@rupinderjeet OK! I will update that.