From: Pierre Joye Date: Wed, 2 Jul 2003 11:24:52 +0000 (+0000) Subject: - MFH X-Git-Tag: php-4.3.3RC2~185 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ebbe4d551b2ca41f8a3ea30243cac3fbbf48d42;p=php - MFH --- diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index fba4d1841f..a2f6c0c03e 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -2075,9 +2075,12 @@ void gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int s } else { dc = gdImageGetPixel(dst, tox, toy); - ncR = (int)(gdImageRed (src, c) * (pct / 100.0f) + ((100 - pct) / 100.0f)); - ncG = (int)(gdImageGreen (src, c) * (pct / 100.0f) + ((100 - pct) / 100.0f)); - ncB = (int)(gdImageBlue (src, c) * (pct / 100.0f) + ((100 - pct) / 100.0f)); + ncR = (int)gdImageRed (src, c) * (pct / 100.0) + + gdImageRed (dst, dc) * ((100 - pct) / 100.0); + ncG = (int)gdImageGreen (src, c) * (pct / 100.0) + + (int)gdImageGreen (dst, dc) * ((100 - pct) / 100.0); + ncB = (int)gdImageBlue (src, c) * (pct / 100.0) + + gdImageBlue (dst, dc) * ((100 - pct) / 100.0); /* Find a reasonable color */ nc = gdImageColorResolve (dst, ncR, ncG, ncB);