downsampling

How to downsample images correctly?

大兔子大兔子 提交于 2019-11-26 13:45:39
Background Creating an app that has a lot of high quality images, I've decided to downscale the images to the needed size (meaning that if the image is larger than the screen , I downscale it ) . The problem I've noticed that on some devices, if the images are downscaled, they become blurry/pixelated, yet on the same devices, for the same target imageView size, if the images aren't downscaled, they look just fine. What I've tried I've decided to check this issue further, and created a small POC app that shows the issue. Before showing you code, here's a demo of what I'm talking about : it's a

How to downsample images correctly?

不问归期 提交于 2019-11-26 03:44:09
问题 Background Creating an app that has a lot of high quality images, I\'ve decided to downscale the images to the needed size (meaning that if the image is larger than the screen , I downscale it ) . The problem I\'ve noticed that on some devices, if the images are downscaled, they become blurry/pixelated, yet on the same devices, for the same target imageView size, if the images aren\'t downscaled, they look just fine. What I\'ve tried I\'ve decided to check this issue further, and created a