Why does this border appear around the edges when I downscale a bitmap and how do I avoid it? I tried every filter I know, the results go from bad to worse.
Here's the original bitmap:
Why does this border appear around the edges when I downscale a bitmap and how do I avoid it? I tried every filter I know, the results go from bad to worse.
Here's the original bitmap:
I don't know libgdx, but the problem is with your image. There are low opacity, white-ish pixels all around the edges of the Moon (ARGB is around (1, 255, 255, 255)
)
It's important to be aware of the fact that all pixels in an image have R, G and B values, even the ones where alpha is zero, and they might cause artifacts during sampling. There is a detailed article on this here: article.