public void removeHorizontalSeam(int[] a) {
        if (!validSeam(a, height() - 1)) {
            throw new IllegalArgumentException("Input seam is not valid");
        }
        if (a.length != width()) {
            throw new IllegalArgumentException(
                    "Input seam is not equal to picture width");
        }
        if (height() <= 1) {
            throw new IllegalArgumentException("Picture height <= 1");
        }
        if (!transposed) {
            transpose();
            transposed = true;
        }
        removeSeam(a);
    }