vinc3m1 / RoundedImageView

A fast ImageView that supports rounded corners, ovals, and circles.
Other
6.44k stars 1.25k forks source link

Fatal Exception: java.lang.OutOfMemoryError #253

Closed rezaiyan closed 4 years ago

rezaiyan commented 4 years ago

Failed to allocate a 16777228 byte allocation with 14638304 free bytes and 13MB until OOM com.makeramen.roundedimageview.RoundedDrawable.drawableToBitmap

com.makeramen.roundedimageview.RoundedDrawable.drawableToBitmap (RoundedDrawable.java:134) com.makeramen.roundedimageview.RoundedDrawable.fromDrawable (RoundedDrawable.java:117) com.makeramen.roundedimageview.RoundedImageView.setImageDrawable (RoundedImageView.java:233)

Mohsen-Nejati commented 4 years ago

you just need have a rule for your image >>> max image size (to NOT see fatal exception any more) : 660 * 700

vinc3m1 commented 4 years ago

You're not using a bitmapdrawable, as documented in the known issues other drawables result in creating large bitmaps and often have better ways to creating rounding than this library.