program applies seam carving to image