<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 24, 2022, 2:18 PM Jinoh Kang <<a href="mailto:jinoh.kang.kr@gmail.com">jinoh.kang.kr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 4/24/22 06:27, Nikolay Sivov wrote:<br>
> <br>
> <br>
> On 4/23/22 20:53, Jinoh Kang wrote:<br>
>> Wine-Bug: <a href="https://bugs.winehq.org/show_bug.cgi?id=52673" rel="noreferrer noreferrer" target="_blank">https://bugs.winehq.org/show_bug.cgi?id=52673</a><br>
>> Signed-off-by: Jinoh Kang <<a href="mailto:jinoh.kang.kr@gmail.com" target="_blank" rel="noreferrer">jinoh.kang.kr@gmail.com</a>><br>
>> ---<br>
>><br>
>> Notes:<br>
>>      v1 -> v2: no changes<br>
>>           v3 -> v4:<br>
>>      - Remove patch "shell32: Factor out ShellItem_get_uiobject."<br>
>>      - Use IShellItem2_BindToHandler instead of factoring out<br>
>>        ShellItem_get_uiobject<br>
>>      - Use CreateCompatibleDC(NULL) instead of GetDC(NULL)<br>
>>      - Remove new dependency on win32u, use GetIconInfo instead<br>
>>      - Remove new dependency on windowcodecs, use gdiplus instead<br>
>><br>
> I probably missed earlier iterations, but why do you need to use gdiplus at all?<br>
<br>
Because you have to convert potentially-transparent HICON to HBITMAP with alpha channel, which is quite a complicated feat.<br>
<br>
1. HICON can take many pixel formats, ranging from 32-bit ARGB and monochrome with mask.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">s/and/to/</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. hbmColor and hbmMask combinations aren't exactly simple to handle.<br>
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).<br>
<br>
Only WIC and GDI+ has functions to handle most of these.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">have*</div><div dir="auto"><br></div><div dir="auto">Also, shellole.c already imports GDI+ APIs.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
-- <br>
Sincerely,<br>
Jinoh Kang<br>
</blockquote></div></div></div>