Put links to the original source images and show how to smooth them (code).
When the image is smoothed, the algorithm will insert colors between the colors that make up the edges. Thus, with your yellow star image, if the background was white, it will try to add pixels around the edge that are between yellow and white (a lighter shade of yellow). This is what βsmoothsβ the image.
But if the image has an indexed color space, these lighter shades of yellow probably do not exist in the image tray, and as a result, you can get almost any other color in its place, whatever the color in the sections of the index according to the calculated index value.
The image in your question is indexed png and therefore has this problem.
If this is a problem, you need to convert the original source images to an unindexed color space or hide them before indexing images that do not work, if the images need to be scaled by your application or if you need to smooth out different types of background.
Another thing that can happen is that your anti-aliasing is on a different background than you think, in particular, the yellow star is anti-aliased correctly if the background was black, placing your code is the easiest way this is outside.
source share