From f3af171dc4eabba17f4422fd8b5db9175dbde01c Mon Sep 17 00:00:00 2001 From: homm Date: Sun, 12 Oct 2014 20:09:28 +0400 Subject: [PATCH] fix round compensation --- libImaging/BoxBlur.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libImaging/BoxBlur.c b/libImaging/BoxBlur.c index a52e4e589..19fba92a4 100644 --- a/libImaging/BoxBlur.c +++ b/libImaging/BoxBlur.c @@ -36,8 +36,8 @@ HorizontalBoxBlur32(Imaging im, Imaging imOut, float floatRadius) bulk[3] = acc[3] + line[left][3] * rem + line[right][3] * rem; #define SAVE(acc) \ - (UINT8)((acc[0] + .5) / window) | (UINT8)((acc[1] + .5) / window) << 8 | \ - (UINT8)((acc[2] + .5) / window) << 16 | (UINT8)((acc[3] + .5) / window) << 24 + (UINT8)(acc[0] / window + .5) << 0 | (UINT8)(acc[1] / window + .5) << 8 | \ + (UINT8)(acc[2] / window + .5) << 16 | (UINT8)(acc[3] / window + .5) << 24 ImagingSectionEnter(&cookie);