facebook/fresco

Rounding image corners drops its quality

Open

#2,346 opened on May 29, 2019

View on GitHub
 (7 comments) (0 reactions) (0 assignees)Java (17,072 stars) (3,750 forks)batch import
buggood first issuehelp wanted

Description

Description

Setting the roundInCircle mode on SimpleDraweeView causes the image to drop in quality dramatically. I've read the article, but it doesn't provide the reasoning of why the image gets malformed.

Reproduction

The image itself is being set as fallowed:


<com.facebook.drawee.view.SimpleDraweeView
                android:layout_width="@dimen/icon_size"
                android:layout_height="@dimen/icon_size"
                app:actualImageResource="@drawable/a1"
                app:roundAsCircle="true"
        />

Solution

Glide library and the android internal method of rounding drawables (BitmapDrawable.cornerRadius) are somehow deal with the issue (see the screenshot with examples)

Additional Information

  • Fresco version: 1.13.0
  • Platform version: Android 9, Google Pixel 3

Example

Contributor guide