Sorry, but true anti-aliasing is not to get the average color from your neighbors as mentioned above. This will undoubtedly soften the edges, but does not smooth, but blurs. True anti-aliasing is simply not possible to do correctly on a bitmap, as it must be calculated during drawing to determine which pixels and / or edges should be “softened” and which are not. For example: imagine that you draw a horizontal line that should be exactly 1 pixel (say, "high") and should be placed exactly in the line coordinate of the integer screen. Obviously, you want it to not be softened, and the correct anti-aliasing algorithm will do this, drawing your line as a perfect row of solid pixels, surrounded by perfect color pixels of the background, without any tone mixing. But if you take the same line after drawing it (i.e. the Bitmap image) and apply the middle method, you will get blur above and below the line, the result is a horizontal line 3 pixels wide, which is not the goal. Of course, everything can be achieved with the right coding, but with a completely different and much more complex approach.
source share