From f619d17ff3fbc8f8ff60a1175bc83435f977550c Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 17 Apr 2009 13:00:31 +0200 Subject: Fix ARGB8565 onto RGB16 image blending on windows The rounding was just wrong... Task-number: 246009 Reviewed-by: Trond --- src/gui/painting/qblendfunctions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 6589439..84a1e4a 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -363,9 +363,9 @@ template void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl, quint32 siag = dg * sia; quint32 siab = db * sia; - quint32 rr = ((siar + (siar>>8) + (0x80 << 11)) >> 8) & 0xf800; - quint32 rg = ((siag + (siag>>8) + (0x80 << 5)) >> 8) & 0x07e0; - quint32 rb = ((siab + (siab>>8) + (0x80 >> 3)) >> 8); + quint32 rr = ((siar + (siar>>8) + (0x80 << 8)) >> 8) & 0xf800; + quint32 rg = ((siag + (siag>>8) + (0x80 << 3)) >> 8) & 0x07e0; + quint32 rb = ((siab + (siab>>8) + (0x80 >> 3)) >> 8) & 0x001f; *dst = alphaFunc.bytemul(spix) + rr + rg + rb; #endif -- cgit v0.12