Commit 3cf9d949 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Implement HasAlpha for palettes.

parent cf8a26af
......@@ -225,8 +225,23 @@ static HRESULT WINAPI PaletteImpl_IsGrayscale(IWICPalette *iface, BOOL *pfIsGray
static HRESULT WINAPI PaletteImpl_HasAlpha(IWICPalette *iface, BOOL *pfHasAlpha)
{
FIXME("(%p,%p): stub\n", iface, pfHasAlpha);
return E_NOTIMPL;
PaletteImpl *This = (PaletteImpl*)iface;
int i;
TRACE("(%p,%p)\n", iface, pfHasAlpha);
if (!pfHasAlpha) return E_INVALIDARG;
*pfHasAlpha = FALSE;
for (i=0; i<This->count; i++)
if ((This->colors[i]&0xff000000) != 0xff000000)
{
*pfHasAlpha = TRUE;
break;
}
return S_OK;
}
static const IWICPaletteVtbl PaletteImpl_Vtbl = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment