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.

The image gets slightly distorted on pixel perfect images

See original GitHub issue

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 that ImageView with a CircleImageView, 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: Comparison

Using the plain ImageView: ImageView

Using CircleImageView: CicleImageView

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 😃 🎆 🎆 🎆

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
hdodenhofcommented, Jan 26, 2020

v3.1.0 with the change is released and should be available on MavenCentral and jCenter.

1reaction
rocboronatcommented, Jan 27, 2020

Awesome! Thanks for that quick release, @hdodenhof

Releasing to production in 3, 2, 1… 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Full guide to Fix Pixelated Image - Wondershare Repairit
The most common cause of image pixelation is the resizing of pictures. ... When it comes to fixing pixelated photos online, an excellent...
Read more >
How To Fix Pixelated Photos & Pictures - Alphr
When this happens, images become blurry, distorted, and just overall worse in quality. Pixelation usually occurs when you try to resize a low- ......
Read more >
The Pixel 6 & 7 Cameras' Over Processing and Image ...
Why the new Pixel 7 camera turns out over processed and distorted images as it moves beyond its 1x focal length into its...
Read more >
Preventing Blurry Pictures: The Keys to Clear Images
Nothing is more frustrating than blurry pictures. While you can try tinkering in a photo editing program, the best strategy is to start...
Read more >
Distorting -- ImageMagick Examples
There are only a few basic ways an image processor can distort images. The Simple Distortion operators for example are achieved by Pixel...
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