Class SeamCarver

    • Method Detail

      • promptForSize

        private static int promptForSize​(String dimension,
                                         int max)
        Gets new size for resizing image.
        Parameters:
        dimension - the type of dimension ("width" or "height").
        max - the current dimension of this type.
        Returns:
        the new dimension to resize to.
      • removeHorizontal

        public List<Integer> removeHorizontal()
        Removes and returns a minimum-cost horizontal seam from the picture.
        Returns:
        a minimum-cost horizontal seam.
      • removeVertical

        public List<Integer> removeVertical()
        Removes and returns a minimum-cost vertical seam from the picture.
        Returns:
        a minimum-cost vertical seam.