The Blur 'filter is a subclass of COnvolver and simply runs through ~very pixel in the source image array, img pixels, and computes the average of the 3 x3 box surrounding it. The corresponding output pixel in newimg pixels is that average value.
The Sharpen filter is also, a subclass of Convolver 'and is (more or-less) the inverse of Blur. It-runs through every pixel in the source image array, megapixels, and computes , the average of the 3x3 box surrounding it, not counting the center. The corresponding output pixel in newimg pixels has the difference between the center pixel and the surrounding average added to it. This basically says that if a pixel is 30 brighter than its surroundings, make it another 30 brighter. If, however, it is 10 darker, then make it another 10 darker. This tends to accentuate edges while leaving smooth areas unchanged .