This is happening because your loop is summing values from neighbors to the left and up of the current pixel that have already been blurred by previous iterations of the same loop. You need to modify a copy of image, not image itself. memcpy can help you copy the data from image into another two dimensional array. Otherwise, your function seems ...
Please note I haven't validated this with testing and have only glanced at your code, but one thing that stands out to me:
round((float) (sum_blue / pixel_type))
Remember operator precedence here: the division will be performed first (as it is inside parentheses). At this point both values are integers so integer division will be performed and the remainder ...
Just get rid of int x=0; and replace x+i-1 with int x = i - 1. Likewise for the variable y. You can put any expression or declaration in the first section of the for loop.
If this answers your question, please click on the check mark to accept. Don't be shy to ask another question the next time you have an issue!