bruns added a comment.
Criteria for a good selection algorithm: 1. If there is an exact fit, use it 2. If all candidates have the same aspect ratio, use the best fit - prefer slight downscaling over slight upscaling - prefer slight upscaling over large downscaling 3. If aspect ratio of candidates differ, use the best fit - For all subsets of (approximately) same aspect ratio, (2.) should select one candidate per set - Determine which of the subsets yielded the best overall candidate The last point is difficult to answer - prefer upscaling a candidate with matching aspect ratio, or downscaling a nonmatching one. REPOSITORY R320 KIO Extras REVISION DETAIL https://phabricator.kde.org/D14308 To: broulik, #frameworks, dfaure, ngraham, pali, vonreth, antlarr Cc: anthonyfieroni, bruns