From a83ef0f0ed65961eace4869fcf6aa906576caed0 Mon Sep 17 00:00:00 2001 From: homm Date: Mon, 25 Mar 2013 09:49:35 +0400 Subject: [PATCH] =?UTF-8?q?=E2=89=8820%=20faster,=202=20times=20more=20pre?= =?UTF-8?q?cisely=20(0.17%=20difference=20against=200.37%)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libImaging/AlphaComposite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libImaging/AlphaComposite.c b/libImaging/AlphaComposite.c index 93afe2a95..86af8e940 100644 --- a/libImaging/AlphaComposite.c +++ b/libImaging/AlphaComposite.c @@ -74,7 +74,7 @@ ImagingAlphaComposite(Imaging imDst, Imaging imSrc) // There we use 7 bits for precision. // We could use more, but we go beyond 32 bits. UINT16 coef1 = src->a * 255 * 255 * 128 / outa255; - UINT16 coef2 = blend * 255 * 128 / outa255; + UINT16 coef2 = 255 * 128 - coef1; #define SHIFTFORDIV255(a)\ ((a >> 8) + a >> 8)