Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void zoomImage(){
- // YOUR CODE HERE
- int height = this.image.length;
- int width = this.image[0].length;
- int halfwidth = (int) (width/2);
- int halfheight = (int) (height/3);
- for(int i = halfheight; i>=0; i--){
- System.out.println("i made it through the first for loop");
- if (height>=0){
- System.out.println("i made it heigh>0");
- for(int a = halfwidth; a>=0; a--){
- System.out.println("i made it in the 2nd for loop");
- if(width>=0){
- System.out.println("i made it into the loop :)");
- this.image[height][width] = this.image[i][a];
- this.image[height][width-1] = this.image[i][a];
- this.image[height-1][width] = this.image[i][a];
- this.image[height-1][width-1] = this.image[i][a];
- width = width-2;
- }
- }
- }
- height = height-2;
- }
- this.redisplayImage();
- }
Add Comment
Please, Sign In to add comment