PIL demo - generate a thumbnail.
1. shrink the image proportionally and crop the center part to fit in the box as much as possible.