Processes.Items[x].Icon color depth issue

delphi package - easy access to kernel objects etc.
Post Reply
George
Posts: 3
Joined: Thu Jan 27, 2005 1:36 am

Processes.Items[x].Icon color depth issue

Post by George »

Hello,

i've posted it before but I cant see it on the forums, so Im reposting.

the ShellObj(FileName).GetIcon(16) will get the right 256 colors icon but the

Processes.Items[x].Icon will get the first 16x16 icon and will convert it to 256colors. Which means if the first set is winxp true color, it will convert the 16x16 true color down to 16x16 256, making an ungly solid black shadow around the image.

Thanks
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

The reason for that is that madKernel uses SHGetFileInfo while madShell uses IExtractIcon. The latter one seems to be superior, but it's also more difficult to use. Adding IExtractIcon to madKernel would mean to add redundant code. I'd suggest to simply use both madKernel + madShell to get the best result.
Post Reply