iliaa Mon Feb 24 22:53:22 2003 EDT Modified files: (Branch: PHP_4_3) /php4/ext/gd/libgd gd.c Log: MFH (fix for crash in gdImageCopyMergeGray()). Index: php4/ext/gd/libgd/gd.c diff -u php4/ext/gd/libgd/gd.c:1.24.2.3 php4/ext/gd/libgd/gd.c:1.24.2.4 --- php4/ext/gd/libgd/gd.c:1.24.2.3 Sat Feb 8 03:54:11 2003 +++ php4/ext/gd/libgd/gd.c Mon Feb 24 22:53:22 2003 @@ -2000,9 +2000,7 @@ else { dc = gdImageGetPixel (dst, tox, toy); - g = 0.29900f * dst->red[dc] - + 0.58700f * dst->green[dc] - + 0.11400f * dst->blue[dc]; + g = (0.29900f * gdImageRed(dst, dc)) + (0.58700f * gdImageGreen(dst, dc)) + (0.11400f * gdImageBlue(dst, dc)); ncR = (int)( gdImageRed (src, c) * (pct / 100.0f) + gdImageRed (dst, dc) * g * ((100 - pct) / 100.0f));
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php