For increasing the image size from 8X8 to 32X32, I tried to do zero padding. The simplest concept of zero padding in Java for me seems to be the code as shown below in Java such that I can shift each point by 4 points while rescaling.
for (int i = 0; i < imageWidth; i += 4)
for (int j = 0; j < imageHeight; j += 4)
pspectrum[i][j] = powerspectrum[(i + 1)/4][(j + 1)/4];
Now, what I am mainly concerned is that is there any more accurate method and how this helps with my calculation.