White edges in a generated texture issue

I am generating a texture at run time and coloring it using SetPixel yet I am getting weird white edges around the sides. I have read that its an issue with the alpha channel, but I’m not sure to fix it at run time. Could anyone help me out here?

The issue:

Looks more like you aren’t clamping the texture

I am clamping the texture.