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
The image gets slightly distorted on pixel perfect images #356
Comments
I've thought that having a common 40dp without padding (that I used to have a bigger touchable area) would fix the issue... but nope. A 40dp There are this widgets: <de.hdodenhof.circleimageview.CircleImageView
style="@style/fast_share_button"
android:src="@drawable/ic_share_default" />
<de.hdodenhof.circleimageview.CircleImageView
style="@style/fast_share_button"
android:src="@drawable/ic_share_default"
android:rotation="@integer/rtl_rotation"/>
<ImageView
style="@style/fast_share_button"
android:src="@drawable/ic_share_default"
android:rotation="@integer/rtl_rotation"/> And the style is: <style name="fast_share_button">
<item name="android:layout_width">@dimen/icon_fast_share</item>
<item name="android:layout_height">@dimen/icon_fast_share</item>
<item name="android:layout_margin">@dimen/padding_medium</item>
<item name="android:foreground">@drawable/ripple_on_transparent_round</item>
</style> |
Hi @rocboronat, thanks for the detailed report! I just tried to reproduce your issue but wasn't successful so far. Using a 40dp image with 40dp widgets this is what I get: I'm currently a little lost as to what might be causing the issue for you. Does this happen on all devices? Does this only happen with the share icon or any pixel-perfect icon of that size? Can you reproduce the issue dropping the image in question into the sample app? |
I just pushed a small change to You can switch to the feature branch by adding the jitpack repository to your build file and replacing the
Thanks! |
Of course I will, @hdodenhof! Thanks for getting dirt in your hands today 😄 |
@rocboronat Have you had a chance to try out the tweak yet? |
Nope, I've been focused in marketing things and didn't have space to try it. But I have it on mind. Thanks for the patience! :·) |
👌 |
Good morning @hdodenhof ! 🌞 Here's a comparison between master and your patch branch: You fixed it! 👏🙇 If you want to see the issue by yourself, before we update the app, download QuitNow! and check the flags in the top right corner. I'm so glad I opened this issue. I think it happened for years... I always had it in my "I will investigate this slight issue someday" because I thought that the issue was related to the image itself... and well, you fixed it with a line of code. Hell yeah! 🎉 Thanks a lot and congrats for the good work 😃 |
Hi @rocboronat, that's great to hear! I'll try to prepare a new release today or tomorrow at latest so you don't need to rely on a temporary feature branch. What's a little strange though is that the change should only have an effect if scaling is involved - which shouldn't be the case for pixel perfect images... 🤔 I'll try to get to the bottom of this when I find some time. I'll update this once the new release is ready. Cheers! |
Thanks a lot! 🚀 |
|
Awesome! Thanks for that quick release, @hdodenhof Releasing to production in 3, 2, 1... 😄 |
Hi everyone! Here's a very picky image distortion bug.
I have a 56dp widget with an 8dp padding. On the other side, I have pixel-perfect images made at 40dp (it's 56dp - 8dp * 2 sides).
If I apply those images to an
ImageView
, the result is pixel-perfect. But if I replace thatImageView
with aCircleImageView
, the result is not pixel-perfect anymore.Thinking about it, I think that
CircleImageView
is getting the 40dp image, then resizing it to 56dp, and then applying the padding and resizing the image again to 40dp.Here are some screenshots. First a comparison, and then a screenshot of every case:
Comparing side by side:
Using the plain
ImageView
:Using
CircleImageView
:By the way, I'm using a local .png file. No network or strange things there.
Thanks again for your work! And happy New Year 😃 🎆 🎆 🎆
The text was updated successfully, but these errors were encountered: