1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00
This commit is contained in:
Pierre Joye
2003-07-02 11:23:56 +00:00
parent b7c2a33f30
commit 19f3c5b5fa

View File

@@ -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);