What is the best way to resize photos and create square, same-sized thumbnail pictures for photostreams? Flickr and Facebook do this, and we would like to emulate this functionality.
Here's an example: http://www.flickr.com/photos/alphageek/233472093/
If you view the photostream on the right hand side (mid page), all the thumbnails are the same size even though the original images vary in size, and most importantly, the thumbnails appear intelligently cropped.
Flickr is able to automatically crop and resize image around the main focus, as opposed to simply resizing the image to thumbnail size (e.g., by setting the image width and height), which would cause the image to look squished and lose the focus of the image.
For such problems, i always use: http://www.imagemagick.org/script/convert.php.
Imagemagick provides a lot of functions for manipulations images. I take images in a loop and create a large version and a thumbnail-version.