This week we're implementing
seam carving which is an algorithm for resizing images without scaling or cropping and with minimal distortion. Although it's actually a fairly simple algorithm based on finding shortest paths through graphs, it was only discovered (invented?) in 2007.
We're having to implement it using Java, but there is an on-line JavaScript version you can play with
here to get a feel for what the algorithm is capable of. It is so useful that it's now been incorporated into most paint programs and even operating systems and browsers so that images can be resized to fit displays with the minimum of distortion or loss of important detail.