That is not my whole code, this part is just for blurring an image. The first 2 for loops pick a pixel in the image, the 3rd for loops takes care of the colour (There are 4 main colours in an image: red, green, blue and alpha)
the instructions after tell the program to check each pixel surrounding the selected pixel. What I want to do next is to tell the program to add all the reds, then average it with 8. Add all the blues and average it with 8 and so on.
I know the corners and sides don't work for my program, I'm just focused on the middle part of the image. Is there a way to add the values of the colours when the programs sifts through the pixels?