I am trying to unroll the inner i and j loops within this multi-dimensional array which spits out a block image. Unfortunately, the image does not match the color of the original image probably because filter->get(i,j) gets altered in a way that I don't want it to. If anyone can give me insight, that will be much appreciated.
We are up to the day of having computers with lots of clock cycles every second where optimization should not be first on your mind (this does not apply to everything, just most things that you would see the average programmer working on). You should worry about making your code as clean and neat as possible, rather than trying to write everything in an extremely efficient manner.