[PATCH v4 4/4] shell32: Partially implement IShellItemImageFactory (icon only, no thumbnail).

Jinoh Kang jinoh.kang.kr at gmail.com
Sun Apr 24 00:18:34 CDT 2022


On 4/24/22 06:27, Nikolay Sivov wrote:
> 
> 
> On 4/23/22 20:53, Jinoh Kang wrote:
>> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52673
>> Signed-off-by: Jinoh Kang <jinoh.kang.kr at gmail.com>
>> ---
>>
>> Notes:
>>      v1 -> v2: no changes
>>           v3 -> v4:
>>      - Remove patch "shell32: Factor out ShellItem_get_uiobject."
>>      - Use IShellItem2_BindToHandler instead of factoring out
>>        ShellItem_get_uiobject
>>      - Use CreateCompatibleDC(NULL) instead of GetDC(NULL)
>>      - Remove new dependency on win32u, use GetIconInfo instead
>>      - Remove new dependency on windowcodecs, use gdiplus instead
>>
> I probably missed earlier iterations, but why do you need to use gdiplus at all?

Because you have to convert potentially-transparent HICON to HBITMAP with alpha channel, which is quite a complicated feat.

1. HICON can take many pixel formats, ranging from 32-bit ARGB and monochrome with mask.
2. hbmColor and hbmMask combinations aren't exactly simple to handle.
3. Windows always seems to output a 32-bit ARGB bitmap. GDI routines alone aren't particularly suited for the task (GdiAlphaBlend works with PARGB, not ARGB).

Only WIC and GDI+ has functions to handle most of these.

-- 
Sincerely,
Jinoh Kang



More information about the wine-devel mailing list