jgabrielfreitas / BlurImageView

ImageView with blur
MIT License
51 stars 10 forks source link

Not working when Image is Drawable #8

Open parmarkamlesh opened 3 years ago

parmarkamlesh commented 3 years ago

When i set src to drawable it throw exception cant cast drawable to bitmap

prateektc commented 2 years ago

You can convert the drawable into a bitmap: Bitmap myBitmap = ((BitmapDrawable) ResourcesCompat.getDrawable(context.getResources(), R.drawable.my_drawable, null)).getBitmap();