On top of the obvious (resize to largest dimension, crop smallest) I'm guessing they set an anchor point on the image rather than use the center.
For example, the pig's face isn't centered. So rather than returning the center of the image, they crop the sides proportionally to the anchor point on the pig's face.
Edit: Nup. They just crop it down the middle. If you're the developer feel free to steal the above.
I would guess they pull from the wiki commons and then use typical JPG or PNG algorithm libraries to stretch or compress the image. There's probably some AI to retrieve images that don't need to be stretched much so that it looks natural.
> The provided images are for layout purposes and each image we use for this project is released under the creative commons license (CC BY-SA). For more information visit http://creativecommons.org/licenses/
So, if you want to use the images for more than just layouts, you have to double check the license and ask the author. For this we will link to each photographer's flickr page. Furthermore, we assume no liability.
For example, the pig's face isn't centered. So rather than returning the center of the image, they crop the sides proportionally to the anchor point on the pig's face.
Edit: Nup. They just crop it down the middle. If you're the developer feel free to steal the above.