mirror of
https://github.com/php/php-src.git
synced 2026-03-27 17:52:16 +01:00
MFH: Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect
results).
This commit is contained in:
2
NEWS
2
NEWS
@@ -3,6 +3,8 @@ PHP 4 NEWS
|
||||
?? ??? 2003, Version 4.3.5
|
||||
- Fixed header handler in NSAPI SAPI module (header->replace was ignored,
|
||||
send_default_content_type now sends value from php.ini). (Uwe Schindler)
|
||||
- Fixed bug #26097 (gdImageColorClosestAlpha() returns incorrect results).
|
||||
(sprice at wisc dot edu, Ilia)
|
||||
- Fixed bug #26042 (memory leak if mcrypt_generic_deinit() is not called
|
||||
after every mcrypt_generic_init() call). (Ilia)
|
||||
- Fixed bug #26025 (Segfault on glob() without GLOB_NOCHECK or GLOB_NOMAGIC
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user