Index: subsystems/win32/win32k/dib/dib16bpp.c =================================================================== --- subsystems/win32/win32k/dib/dib16bpp.c (revision 35845) +++ subsystems/win32/win32k/dib/dib16bpp.c (working copy) @@ -1064,7 +1064,7 @@ struct { USHORT red:5, - green:6, + green:5, blue:5; } col; } NICEPIXEL16; @@ -1142,8 +1142,8 @@ DstPixel.us = DIB_GetSource(Source, SrcX++, SrcY, ColorTranslation); SrcPixel.col.red = (DstPixel.col.red << 3) | (DstPixel.col.red >> 2); - SrcPixel.col.green = (DstPixel.col.green << 2) | - (DstPixel.col.green >> 4); + SrcPixel.col.green = (DstPixel.col.green << 3) | + (DstPixel.col.green >> 2); SrcPixel.col.blue = (DstPixel.col.blue << 3) | (DstPixel.col.blue >> 2); } @@ -1172,8 +1172,8 @@ DstPixel.col.red = Clamp5(DstPixel.col.red * (255 - Alpha) / 255 + (SrcPixel.col.red >> 3)); - DstPixel.col.green = Clamp6(DstPixel.col.green * (255 - Alpha) / 255 + - (SrcPixel.col.green >> 2)); + DstPixel.col.green = Clamp5(DstPixel.col.green * (255 - Alpha) / 255 + + (SrcPixel.col.green >> 3)); DstPixel.col.blue = Clamp5(DstPixel.col.blue * (255 - Alpha) / 255 + (SrcPixel.col.blue >> 3)); Index: subsystems/win32/win32k/dib/dib24bpp.c =================================================================== --- subsystems/win32/win32k/dib/dib24bpp.c (revision 35845) +++ subsystems/win32/win32k/dib/dib24bpp.c (working copy) @@ -661,11 +661,14 @@ Alpha = ((BlendFunc.AlphaFormat & AC_SRC_ALPHA) != 0) ? SrcPixel.col.alpha : BlendFunc.SourceConstantAlpha; - DstPixel.ul = *Dst; + //copy only 24bits of dst + DstPixel.ul = *(PUSHORT)(Dst) + (*(Dst+2) << 16); DstPixel.col.red = Clamp8(DstPixel.col.red * (255 - Alpha) / 255 + SrcPixel.col.red); DstPixel.col.green = Clamp8(DstPixel.col.green * (255 - Alpha) / 255 + SrcPixel.col.green); DstPixel.col.blue = Clamp8(DstPixel.col.blue * (255 - Alpha) / 255 + SrcPixel.col.blue); - *Dst = DstPixel.ul; + //copy back 24bits of result + *(PUSHORT)(Dst) = (USHORT)(DstPixel.ul & 0xFFFF); + *(Dst + 2) = (UCHAR)((DstPixel.ul >> 16) & 0xFF); Dst = (PUCHAR)((ULONG_PTR)Dst + 3); } Dst = (PUCHAR)((ULONG_PTR)Dst + DstDelta);