@dpy: anti-aliasing is controlled blurring, and blurring is quite easy, it's mixing colours. So an average blur with a radius of 1 might look something like this:
CurrentPixel.R=(src[x+1,y+1].R+src[x,y+1].R+src[x-1,y+1].R+src[x+1,y].R+src[x,y].R+src[x-1,y].R+src[x+1,y-1].R+src[x,y-1].R+src[x-1,y-1].R)/9; //repeat for Green, Blue and Alpha
A more complicated blur would consider pixel further away as less important, so a your CurrentPixel would have less information from src[x+5,y+5] then src[x+1,y]. For a more controlled blur you could use the alpha value to search for edges, for example:
if (Math.Abs(src[x,y]-src[x-1,y])>100) //Math.Abs() is a method to make sure your value is positive, it convert negative numbers to positive numbers, which in this case comes in handy.