diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c index 69b09adba64..8117d6d107e 100644 --- a/dlls/gdi32/bitmap.c +++ b/dlls/gdi32/bitmap.c @@ -67,6 +67,14 @@ DWORD nulldrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, info->bmiHeader.biYPelsPerMeter = 0; info->bmiHeader.biClrUsed = 0; info->bmiHeader.biClrImportant = 0; + if (bmp->bitmap.bmBitsPixel == 16) + { + DWORD *masks = (DWORD *)info->bmiColors; + masks[0] = 0x7c00; + masks[1] = 0x03e0; + masks[2] = 0x001f; + info->bmiHeader.biCompression = BI_BITFIELDS; + } if (!bits) goto done; height = src->visrect.bottom - src->visrect.top; diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 17b2966363d..b5f4f2bae70 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -339,6 +339,8 @@ static BOOL dibdrv_DeleteDC( PHYSDEV dev ) static void set_color_info( const dib_info *dib, BITMAPINFO *info ) { + DWORD *masks = (DWORD *)info->bmiColors; + info->bmiHeader.biCompression = BI_RGB; info->bmiHeader.biClrUsed = 0; @@ -355,19 +357,14 @@ static void set_color_info( const dib_info *dib, BITMAPINFO *info ) } break; case 16: - if (dib->funcs != &funcs_555) - { - DWORD *masks = (DWORD *)info->bmiColors; - masks[0] = dib->red_mask; - masks[1] = dib->green_mask; - masks[2] = dib->blue_mask; - info->bmiHeader.biCompression = BI_BITFIELDS; - } + masks[0] = dib->red_mask; + masks[1] = dib->green_mask; + masks[2] = dib->blue_mask; + info->bmiHeader.biCompression = BI_BITFIELDS; break; case 32: if (dib->funcs != &funcs_8888) { - DWORD *masks = (DWORD *)info->bmiColors; masks[0] = dib->red_mask; masks[1] = dib->green_mask; masks[2] = dib->blue_mask; @@ -417,12 +414,8 @@ static DWORD dibdrv_GetImage( PHYSDEV dev, HBITMAP hbitmap, BITMAPINFO *info, } break; case 16: - if (bmp->dib->dsBmih.biCompression == BI_BITFIELDS && - memcmp( bmp->dib->dsBitfields, bit_fields_555, sizeof(bmp->dib->dsBitfields) )) - { - info->bmiHeader.biCompression = BI_BITFIELDS; - memcpy( info->bmiColors, bmp->dib->dsBitfields, sizeof(bmp->dib->dsBitfields) ); - } + info->bmiHeader.biCompression = BI_BITFIELDS; + memcpy( info->bmiColors, bmp->dib->dsBitfields, sizeof(bmp->dib->dsBitfields) ); break; case 32: if (bmp->dib->dsBmih.biCompression == BI_BITFIELDS && diff --git a/dlls/winex11.drv/bitblt.c b/dlls/winex11.drv/bitblt.c index 8d2383a7145..7f314c2fa49 100644 --- a/dlls/winex11.drv/bitblt.c +++ b/dlls/winex11.drv/bitblt.c @@ -1641,8 +1641,7 @@ static void set_color_info( PHYSDEV dev, const ColorShifts *color_shifts, BITMAP colors[0] = color_shifts->logicalRed.max << color_shifts->logicalRed.shift; colors[1] = color_shifts->logicalGreen.max << color_shifts->logicalGreen.shift; colors[2] = color_shifts->logicalBlue.max << color_shifts->logicalBlue.shift; - if (colors[0] != 0x7c00 || colors[1] != 0x03e0 || colors[2] != 0x001f) - info->bmiHeader.biCompression = BI_BITFIELDS; + info->bmiHeader.biCompression = BI_BITFIELDS; break; case 32: colors[0] = color_shifts->logicalRed.max << color_shifts->logicalRed.shift;