Scrambling Moving square sections of an image requires some
organization. You need to think of this image as being divided into sixteen
equal sized squares (more or less equal anyways). You simply swap postions
of squares.
Here's the code to perform the scramble. This is a fixed scramble algorithm.
What do you think it would take to do a random scramble?
public void doScramble(){
int test=0;
int z=0;
try{
int pixel[] = new int[w*h];
int hold[] = new int[w*h];
PixelGrabber pg = new PixelGrabber(c, 0, 0, w, h, pixel, 0, w);
if(pg.grabPixels() &&((pg.status() & ImageObserver.ALLBITS) != 0)){
for(int x=0; x