I am trying to blur the image
int radius = 11;
int size = radius * 2 + 1;
float weight = 1.0f / (size * size);
float[] data = new float[size *
You can't blur one pixel. This sounds obvious, but when you think about it, what is the minimum? To blur a pixel, you need neighboring pixels.
The problem here is that at the edges and corners, the pixels have too few neighbours – the blur algorith has too few pixels to use. It has no pixels "outside" the image with which to blur, so it will just leave those as-is.
The solution is either to extend the picture somehow (do you have a larger source image available?), or to cut off the non-blurred bits when you are done. Both are essentially the same.