Signed-off-by: Jinoh Kang jinoh.kang.kr@gmail.com --- dlls/comctl32/static.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/dlls/comctl32/static.c b/dlls/comctl32/static.c index 7a3ac958111..9b20e6a8b66 100644 --- a/dlls/comctl32/static.c +++ b/dlls/comctl32/static.c @@ -203,6 +203,17 @@ static HBITMAP create_alpha_bitmap( HBITMAP hbitmap ) DeleteObject( alpha ); alpha = 0; } + else + { + /* pre-multiply by alpha */ + for (i = 0, ptr = bits; i < bm.bmWidth * bm.bmHeight; i++, ptr += 4) + { + unsigned int alpha = ptr[3]; + ptr[0] = (ptr[0] * alpha + 127) / 255; + ptr[1] = (ptr[1] * alpha + 127) / 255; + ptr[2] = (ptr[2] * alpha + 127) / 255; + } + } }
DeleteDC( hdc );