pajoye Tue Jul 7 10:54:38 2009 UTC Modified files: /php-src/ext/gd/libgd gd.c Log: - WS http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd.c?r1=1.127&r2=1.128&diff_format=u Index: php-src/ext/gd/libgd/gd.c diff -u php-src/ext/gd/libgd/gd.c:1.127 php-src/ext/gd/libgd/gd.c:1.128 --- php-src/ext/gd/libgd/gd.c:1.127 Tue Jul 7 10:50:06 2009 +++ php-src/ext/gd/libgd/gd.c Tue Jul 7 10:54:36 2009 @@ -1195,7 +1195,7 @@ if (as != 0) { wid = thick / as; } else { - wid = 1; + wid = 1; } if (wid == 0) { wid = 1; @@ -1679,7 +1679,7 @@ if ((s % 360) == (e % 360)) { - s = 0; e = 360; + s = 0; e = 360; } else { if (s > 360) { s = s % 360; @@ -1697,7 +1697,7 @@ e += 360; } if (s == e) { - s = 0; e = 360; + s = 0; e = 360; } } @@ -1896,7 +1896,7 @@ do { c = gdImageGetPixel(im, ix, iy); if (c != oc) { - goto done; + goto done; } gdImageSetPixel(im, ix, iy, nc); } while(ix++ < (im->sx -1)); @@ -1908,7 +1908,7 @@ } gdImageSetPixel(im, ix, iy, nc); } while(ix++ < (im->sx -1)); - goto done; + goto done; } stack = (struct seg *)safe_emalloc(sizeof(struct seg), ((int)(im->sy*im->sx)/4), 1); @@ -2308,6 +2308,7 @@ tox++; continue; } + /* * If it's the same image, mapping is NOT trivial since we * merge with greyscale target, but if pct is 100, the grey @@ -2319,9 +2320,9 @@ dc = gdImageGetPixel(dst, tox, toy); g = (0.29900f * gdImageRed(dst, dc)) + (0.58700f * gdImageGreen(dst, dc)) + (0.11400f * gdImageBlue(dst, dc)); - ncR = (int)(gdImageRed (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); - ncG = (int)(gdImageGreen (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); - ncB = (int)(gdImageBlue (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); + ncR = (int)(gdImageRed (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); + ncG = (int)(gdImageGreen (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); + ncB = (int)(gdImageBlue (src, c) * (pct / 100.0f) + g * ((100 - pct) / 100.0)); /* First look for an exact match */ nc = gdImageColorExact(dst, ncR, ncG, ncB);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php