shannon entropy to guess monochrome icon
Summary:
since we can't directly access the svg file, when we can't use
KIconLoader try to detect monochrome icons on the actual image
with the following heuristic:
- less than 30% of pixels with high saturation
- the Shannon entropy of the distribution of gray values of the
non transparent pixels is less than 0.3
this seems to give satisfying results with most icon temes
Test Plan: tested with breeze, oxygen adwayta and some other themes from ghns
Reviewers: Kirigami
Subscribers: ngraham, GB_2, ndavis, VDG, cfeck, davidedmundson, plasma-devel
Tags: Kirigami
Differential Revision: https://phabricator.kde.org/D19392