Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException in getViewBitmap() #52

Open
rupinderjeet opened this issue Mar 30, 2020 · 3 comments
Open

ClassCastException in getViewBitmap() #52

rupinderjeet opened this issue Mar 30, 2020 · 3 comments

Comments

@rupinderjeet
Copy link

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.

@helloyako
Copy link
Contributor

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.

@rupinderjeet
Copy link
Author

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.

@helloyako
Copy link
Contributor

@rupinderjeet
OK! I will update that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants