Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Low quality of SVG icon if one of dimensions is wrap_content #1246

Closed
Subuday opened this issue Apr 22, 2022 · 0 comments · Fixed by #1250
Closed

Low quality of SVG icon if one of dimensions is wrap_content #1246

Subuday opened this issue Apr 22, 2022 · 0 comments · Fixed by #1250

Comments

@Subuday
Copy link

Subuday commented Apr 22, 2022

Describe the bug
If we use SVG decoder and load an SVG into ImageView with specific parameters(one dimension is wrap_content, one dimension has exact size), we get a low quality image. If I use the same attributes, but load an icon using app:srcCompat, there are no any problems with quality. Also, if I use exact dimensions, it also doesn't have any problems.

To Reproduce

  1. Connect SVG module.
  2. Create Image View
      <ImageView
          android:id="@+id/icon"
           android:layout_width="30dp"
           android:layout_height="wrap_content"
           android:scaleType="fitCenter"
           android:adjustViewBounds="true"
  1. Load the SVG to the image. icon

image

Icon with android:layout_width="30dp" android:layout_height="wrap_content"

image

Icon with android:layout_width="30dp" android:layout_height="30dp"

image

Icon with android:layout_width="30dp" android:layout_height="wrap_content", but it was loaded using app:srcCompat attribute.

Version
Coil: 2.0.0-rc03
Emulator Pixel 2 API 29
Huawei Y5 2018 API 27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant