Thumbnail for upload

See #595 
Please, move this method to BitmapUtils as a static.