An energy map (edge detection) is generated from the provided image. The algorithm tries to find the least important parts of the image taking into account the lowest energy values. Using a dynamic programming approach the algorithm will generate individual seams across the image from top to down, or from left to right (depending on the horizontal or vertical resizing) and will allocate for each s