Scale and crop the tree thumbnails for popup

Fixes #47