bugfix: properly calculate thumbnail for portrait images cropped to landscape