question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rounding image corners drops its quality

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
dmitrychistyakovcommented, Jun 6, 2019

Hello, it seems .setPaintFilterBitmap(true) in RoundingParams, which is false by default, fixes this issue @ancientloregames can you check it in your project?

1reaction
dmitrychistyakovcommented, Jun 5, 2019

Bug still exists in fresco 1.14.0 It reproduces only on Android 9, at Android 8 and below it’s fine With OVERLAY_COLOR rounding everything is fine, it reproduces only with BitmapShader rounding

#2293 is fixed in 1.14.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Round Image Corners – Fotoramio
Making rounded corners of an image is easy! Just upload the image to the photo editor, adjust the radius of rounding of corners...
Read more >
Cropping and rounded corners spoils image quality
Doing that just degrades the image quality. The same problem arises when you try rounded corners on the image by dragging the little...
Read more >
Improve Your Images with Rounded Corners and Drop ...
This short video demonstration shows how to round the corners on your digital images and add drop shadows if desired.
Read more >
Round JPG Corners - Online JPG Tools
This online program makes the corners of JPG pictures and photos round. You can control the corner ... Quickly change the quality of...
Read more >
CSS 3 and The Future: Image-free Rounded Corners, Drop ...
Attempting to make a flexible, let alone fixed-width box appear to have rounded corners, drop shadows or gradients is an exercise in frustration....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found