Vincent Povirk : windowscodecs: Use the BITMAPINFOHEADER structure to get icon bitcount.
Module: wine Branch: master Commit: 6a36802f26fc2518c99de329c969fecd907e11e5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a36802f26fc2518c99de329c9... Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Thu May 6 17:07:39 2010 -0500 windowscodecs: Use the BITMAPINFOHEADER structure to get icon bitcount. --- dlls/windowscodecs/icoformat.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index e1ea7c6..180dbb3 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -189,7 +189,7 @@ static HRESULT IcoFrameDecode_ReadPixels(IcoFrameDecode *This) hr = IStream_Read(This->parent->stream, &bih, sizeof(BITMAPINFOHEADER), &bytesread); if (FAILED(hr) || bytesread != sizeof(BITMAPINFOHEADER)) goto fail; - if (This->entry.wBitCount <= 8) + if (bih.biBitCount <= 8) { /* read the palette */ colorcount = This->entry.bColorCount ? This->entry.bColorCount : 256; @@ -202,7 +202,7 @@ static HRESULT IcoFrameDecode_ReadPixels(IcoFrameDecode *This) bitsSize = bitsStride * height; /* read the XOR data */ - switch (This->entry.wBitCount) + switch (bih.biBitCount) { case 1: { @@ -440,11 +440,11 @@ static HRESULT IcoFrameDecode_ReadPixels(IcoFrameDecode *This) break; } default: - FIXME("unsupported bitcount: %u\n", This->entry.wBitCount); + FIXME("unsupported bitcount: %u\n", bih.biBitCount); goto fail; } - if (This->entry.wBitCount < 32) + if (bih.biBitCount < 32) { /* set alpha data based on the AND mask */ UINT andBytesPerRow = (width+31)/32*4;
participants (1)
-
Alexandre Julliard