D14308: [Exe Thumbnailer] Improve icon selection algorithm
Kai Uwe Broulik
noreply at phabricator.kde.org
Mon Jul 30 14:53:12 BST 2018
broulik added inline comments.
INLINE COMMENTS
> bruns wrote in icoutils_common.cpp:33
> I think the formula is a little bit to ad-hoc, and actually wrong.
>
> We have 2 different notable cases. `desiredAspectRatio` obviously is a constant, this leaves us with `candidateAspectRatio` and `delta`
>
> 1. all candiates have exactly the same aspect ratio. The difference below is constant, thus has no influence on the sorting. Sorting is determined by `delta`alone (good).
> 2. candidates have different aspect ratios. Any candidate with a slightly different aspect ratio is immediately heavily penalized, and thus discarded (bad).
>
> Think of e.g. a requested size of 96x96, and two candidates, 32x32 and 128x64. The small one has a `distance` of 128, while the second one has a distance 25032. I don't think that's wanted here.
I'm open to suggestions … also technically you cannot assume the icon is square
REPOSITORY
R320 KIO Extras
REVISION DETAIL
https://phabricator.kde.org/D14308
To: broulik, #frameworks, dfaure, ngraham, pali, vonreth, antlarr
Cc: bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180730/4e9f37c1/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list