Closed Khunchheang closed 7 years ago
Can you show me about problem below: java.lang.RuntimeException: For better performance only BitmapDrawables are supported, but you can override getBitmapFromDrawable() and build bitmap on your own
Image rounding uses BitmapShader
for performance optimization. So in order to round the image it needs to directly use bitmap instance.
It is possible to create bitmap from any drawable manually, but it will require unnecessary memory pressure, so this feature was not implemented intentionally.
By default library only supports BitmapDrawable
, but if you know how to extract bitmap instances from your drawables or you want to generate bitmaps for any drawables then you have to override both CircleImageView
and CircleGestureImageView
and provide your implementation of getBitmapFromDrawable(Drawable)
method.
If you use Glide then another option would be to just use Glide.with(...).load(...).asBitmap()
.
Currently I work with many shapes of ImageView. So Can GestureImageViews work as round shape?