From a511ef8b052db9d339caa2733c3145aef80a045f Mon Sep 17 00:00:00 2001 From: homm Date: Wed, 27 Mar 2013 23:18:10 +0400 Subject: [PATCH] move declarations to make ANSI compilers happy --- libImaging/AlphaComposite.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libImaging/AlphaComposite.c b/libImaging/AlphaComposite.c index 86af8e940..9876cda5f 100644 --- a/libImaging/AlphaComposite.c +++ b/libImaging/AlphaComposite.c @@ -69,6 +69,7 @@ ImagingAlphaComposite(Imaging imDst, Imaging imSrc) // almost equivalent to: // tmp = a + (2 << (n-1)), ((tmp >> n) + tmp) >> n + UINT32 tmpr, tmpg, tmpb; UINT16 blend = dst->a * (255 - src->a); UINT16 outa255 = src->a * 255 + blend; // There we use 7 bits for precision. @@ -79,11 +80,11 @@ ImagingAlphaComposite(Imaging imDst, Imaging imSrc) #define SHIFTFORDIV255(a)\ ((a >> 8) + a >> 8) - UINT32 tmpr = src->r * coef1 + dst->r * coef2 + (0x80 << 7); + tmpr = src->r * coef1 + dst->r * coef2 + (0x80 << 7); out->r = SHIFTFORDIV255(tmpr) >> 7; - UINT32 tmpg = src->g * coef1 + dst->g * coef2 + (0x80 << 7); + tmpg = src->g * coef1 + dst->g * coef2 + (0x80 << 7); out->g = SHIFTFORDIV255(tmpg) >> 7; - UINT32 tmpb = src->b * coef1 + dst->b * coef2 + (0x80 << 7); + tmpb = src->b * coef1 + dst->b * coef2 + (0x80 << 7); out->b = SHIFTFORDIV255(tmpb) >> 7; out->a = SHIFTFORDIV255(outa255 + 0x80); }