I'm seeing very ugly artifacting / jagged edges when I downsize an image on an Android device no matter what I try. I've gone through several potential solutions I found on StackOverflow and blogs, and everything seems to give me similar results.
Scaled Image (214 x 214) (notice the jagged edges):
What I have tried:
- Drawing the image to a
Canvas
using aPaint
with anti-aliasing, and filtering enabled - Multiple variations of
BitmapFactory.decode
bitmap.scale()
- Compressor - an Android Image Scaling Library
All of the above trials have yielded almost the exact same result. This is such a common problem though, that surely I'm overlooking something, or not doing something properly.
If I use a web-based image-resizer, here is the result:
What it should look like:
What can I do to get the same results as the above image?