facebook/fresco

Rounding image corners drops its quality

Open

#2346 aperta il 29 mag 2019

Vedi su GitHub
 (7 commenti) (0 reazioni) (0 assegnatari)Java (3750 fork)batch import
buggood first issuehelp wanted

Metriche repository

Star
 (17.072 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor