Timo Kunze
2010-03-27 22:16:43 UTC
Hi,
my application uses IShellItemImageFactory to retrieve thumbnails on
Windows 7. The app draws them using the AlphaBlend function.
Some thumbnails don't look like in Windows Explorer, which seems to be
caused by IShellItemImageFactory sometimes returning an image with
pre-multiplied alpha and sometimes an image that is not pre-multiplied.
For example the recycler's thumbnail looks right without any
post-processing, so it already is pre-multiplied. A filesystem folder's
thumbnail must be pre-multiplied before drawing, otherwise the shadow,
that it casts to the right, will be missing.
Is there a way to make IShellItemImageFactory always return a
pre-multiplied image? Or is there a (performant) way to decide whether
post-processing is necessary?
Thanks
Timo
my application uses IShellItemImageFactory to retrieve thumbnails on
Windows 7. The app draws them using the AlphaBlend function.
Some thumbnails don't look like in Windows Explorer, which seems to be
caused by IShellItemImageFactory sometimes returning an image with
pre-multiplied alpha and sometimes an image that is not pre-multiplied.
For example the recycler's thumbnail looks right without any
post-processing, so it already is pre-multiplied. A filesystem folder's
thumbnail must be pre-multiplied before drawing, otherwise the shadow,
that it casts to the right, will be missing.
Is there a way to make IShellItemImageFactory always return a
pre-multiplied image? Or is there a (performant) way to decide whether
post-processing is necessary?
Thanks
Timo
--
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."
www.TimoSoft-Software.de - Unicode controls for VB6
"Those who sacrifice freedom for safety deserve neither."
"Demokratie ist per Definition unsicher. Ihr Schutz entsteht aus der
Überzeugung, dass die demokratischen Kräfte überwiegen und sich – auf
demokratischem Wege – durchsetzen."