diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-11-04 01:55:50 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-11-04 01:55:50 +0000 |
commit | b520c9d42c34c30c353cc93579c92ab30f629ff4 (patch) | |
tree | 0f79ccfea924dd3e623c222958a99129f9ed09f6 /ext/gd/libgd | |
parent | 6d5ddf6b78ab5a3949dbf654b41522dbe7403ee0 (diff) | |
download | php-git-b520c9d42c34c30c353cc93579c92ab30f629ff4.tar.gz |
Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results).
Diffstat (limited to 'ext/gd/libgd')
-rw-r--r-- | ext/gd/libgd/gd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 540605a9a5..9b9413320c 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -255,7 +255,7 @@ int gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a) 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; |