Bug 472208 - 24bpp .ico thumbnails render incorrectly, ignoring their mask.
Summary: 24bpp .ico thumbnails render incorrectly, ignoring their mask.
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: NixOS Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-13 03:09 UTC by John Chadwick
Modified: 2023-07-13 03:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
An ico file that demonstrates the problem, created by me. CC0 license. Rendered correctly, it should display as a circle, but KDE displays it as a rectangle. (12.56 KB, image/x-icon)
2023-07-13 03:09 UTC, John Chadwick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Chadwick 2023-07-13 03:09:44 UTC
Created attachment 160260 [details]
An ico file that demonstrates the problem, created by me. CC0 license. Rendered correctly, it should display as a circle, but KDE displays it as a rectangle.

SUMMARY
Some Windows .ico files (handled by the windows image thumcreator in kio-extras) render improperly in Dolphin and other areas of KDE that render file thumbnails. 32bpp icons render using their alpha channel and ignore the mask as expected, but 24bpp icon files do not use their mask as expected.

This is caused by QTBUG-113319, which was fixed in Qt6 dev (and cherrypicked into the active Qt release branches.) Since release versions of KDE currently use Qt 5, the fix would need to be cherry-picked into the KDE Qt fork in order to solve the problem in KDE.  This issue only causes graphical artifacts, so it may not be important enough to warrant a cherry-pick.

STEPS TO REPRODUCE
1. Simply try to view a thumbnail for a 24bpp .ico file with a mask.

OBSERVED RESULT
The mask is not respected: all pixels are opaque.

EXPECTED RESULT
Pixels should be opaque or transparent based on their respective mask bits.

SOFTWARE/OS VERSIONS
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION