SeamCarver implementation finished.