Allow cropping images

Currently, we use Image.thumbnail for resizing images. That
resizes an image so that it is *at most* the given size.

This commit changes that so that images are first resized to
be *at least* the given size. After that they are centered and
then cropped.
use cropped image for tiles
Merge pull request #711 from xi/feature-crop-images

Allow cropping images