Picture just get "blown-up" when I use RoundingParams to get a rounded corner picture
- Dominant language
- Kotlin
- Stars
- 17.2k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Description
I found an issue that seemed to be caused by RoundingParams, but was actually related to the mTargetDensity of the BitmapDrawable which used in RoundedBitmapDrawable
When the density changed by App-Self, the issue maybe appeared.
e.g. [AndroidAutoSize](https://github.com/JessYanCoding/AndroidAutoSize)
I want to getting this:

But got this:

### Reproduction

### Reason
The "blown-up" effect is the result of the updateTransform function:
https://github.com/facebook/fresco/blob/ba6965409a4d31d86c46771e610771dd37b0d51b/drawee/src/main/java/com/facebook/drawee/drawable/RoundedDrawable.java#L236
Trace the following code:
https://github.com/facebook/fresco/blob/19c695fcc54237497fbc8a4a80c790f63668a0dd/drawee/src/main/java/com/facebook/drawee/drawable/RoundedBitmapDrawable.java#L45
Bitmap which used in RoundedBitmapDrawable was from this code:
https://github.com/facebook/fresco/blob/ba6965409a4d31d86c46771e610771dd37b0d51b/imagepipeline/src/main/java/com/facebook/imagepipeline/platform/DefaultDecoder.java#L276
The density of the bitmap which is created in DefaultDecoder is default, but when update transform in RoundedDrawable will use resource density which is changed by App-Self to measure transform
### Expected
Now, I solved it, by updating density of bitmap in some custom class, such as DrawableFactory or Postprocessor, but it's probably not safe, I hope to get a formal solution
Contributor guide
Assessment
This issue has not been assessed yet.