public Picture getOppositeCornerImage() {
    Color[][] col = new Color[h][w];
    Color c;
    int r=0;
    int g=0;
    int b=0;
    for (int i=green.length-1; i>=0; i--) {
      for (int j=green[0].length-1;j>=0; j--) {
        for (int k=green[0][0].length-1; k>=0; k--) {
          if (green[i][j][k]==1)
          {
            g = k;
            for (int m=red[0][0].length-1; m>=0; m--) {
              if (red[i][j][m]==1) {
                r = m;
              }
            }
            for (int n=blue[0][0].length-1; n>=0; n--) {
              if (blue[i][j][n]==1) {
                b = n;
              }
            }
            c = new Color(r,g,b);
            col[h-i-1][w-j-1] = c;
          }
        }
      }
    }
    Picture pic = new Picture(col);
    return pic;
  }