Sometimes it's useful to be able to change the shape of a photo - on our website PropertyMall, we like the thumbnails on our property search results to be a nice uniform size. Rather than stretch the images, we've chosen on that site to crop them down to the correct size, however this approach can sometimes have odd results.
I've just been looking at the Liquid Rescale plugin for GIMP, which attempts to let you rescale images to different aspect ratios without having to distort or crop out the important details. The technology used is Seam Carving, which you can read about in this paper by Shai Avidan and Ariel Shamir, or watch a video about it on Youtube.
As an example, imagine I had a system that only accepted square images. Here is a picture I took a while back of some elephants:
