cvs: php-src /ext/gd/libgd gd.c
| From: | Ilia Alshanetsky | Date: | Tue, 04 Nov 2003 01:55:51 +0000 |
| Subject: | cvs: php-src /ext/gd/libgd gd.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-24418@lists.php.net to get a copy of this message | ||
iliaa Mon Nov 3 20:55:51 2003 EDT
Modified files:
/php-src/ext/gd/libgd gd.c
Log:
Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results).
Index: php-src/ext/gd/libgd/gd.c
diff -u php-src/ext/gd/libgd/gd.c:1.66 php-src/ext/gd/libgd/gd.c:1.67
--- php-src/ext/gd/libgd/gd.c:1.66 Mon Sep 8 16:59:36 2003
+++ php-src/ext/gd/libgd/gd.c Mon Nov 3 20:55:50 2003
@@ -255,7 +255,7 @@
gd = im->green[i] - g;
bd = im->blue[i] - b;
/* gd 2.02: whoops, was - b (thanks to David Marwood) */
- ad = im->blue[i] - a;
+ ad = im->alpha[i] - a;
dist = rd * rd + gd * gd + bd * bd + ad * ad;
if (first || (dist < mindist)) {
mindist = dist;