<table><tr><td style="">mart created this revision.<br />mart added a reviewer: Kirigami.<br />Herald added a project: Kirigami.<br />Herald added a subscriber: plasma-devel.<br />mart requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D19392">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>since we can't directly access the svg file, when we can't use<br />
KIconLoader try to detect monochrome icons on the actual image<br />
with the following heuristic:</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">less than 30% of pixels with high saturation</li>
<li class="remarkup-list-item">the Shannon entropy of the distribution of gray values of the</li>
</ul>
<p>non transparent pixels is less than 0.3<br />
this seems to give satisfying results with most icon temes</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>tested with breeze, oxygen adwayta and some other themes from ghns</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R169 Kirigami</div></div></div><br /><div><strong>BRANCH</strong><div><div>mart/iconentropyheuristic</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D19392">https://phabricator.kde.org/D19392</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/controls/BasicListItem.qml<br />
src/desktopicon.cpp<br />
src/desktopicon.h<br />
src/libkirigami/platformtheme.cpp<br />
src/libkirigami/platformtheme.h</div></div></div><br /><div><strong>To: </strong>mart, Kirigami<br /><strong>Cc: </strong>plasma-devel, domson, dkardarakos, apol, davidedmundson, mart, hein<br /></div>