public SeamCarver(Picture picture) {
    // create a seam carver object based on the given picture
    int picWidth = picture.width();
    int picHeight = picture.height();
    currentPicture = picture;
    pixelColor = new Color[picWidth][picHeight];

    for (int i = 0; i < picHeight; i++) {
      for (int j = 0; j < picWidth; j++) {
        pixelColor[j][i] = picture.get(j, i);
      }
    }
  }
 public int height() {
   // height of current picture
   return currentPicture.height();
 }