Re: cvs: php-src /ext/gd/libgd gd.c
| From: | Jani Taskinen | Date: | Wed, 02 Jul 2003 13:25:57 +0000 |
| Subject: | Re: cvs: php-src /ext/gd/libgd gd.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-22311@lists.php.net to get a copy of this message | ||
Please add the NEWS entry for the bugfix in PHP_4_3 NEWS file.
--Jani
On Wed, 2 Jul 2003, Pierre-Alain Joye wrote:
>pajoye Wed Jul 2 07:23:56 2003 EDT
>
> Modified files:
> /php-src/ext/gd/libgd gd.c
> Log:
> - Fix #23808
>
>
>Index: php-src/ext/gd/libgd/gd.c
>diff -u php-src/ext/gd/libgd/gd.c:1.55 php-src/ext/gd/libgd/gd.c:1.56
>--- php-src/ext/gd/libgd/gd.c:1.55 Thu Jun 12 15:31:44 2003
>+++ php-src/ext/gd/libgd/gd.c Wed Jul 2 07:23:56 2003
>@@ -2075,9 +2075,12 @@
> } else {
> dc = gdImageGetPixel(dst, tox, toy);
>
>- ncR = (int)(gdImageRed (src, c) * (pct / 100.0f) + ((100 - pct) / 100.0f));
>- ncG = (int)(gdImageGreen (src, c) * (pct / 100.0f) + ((100 - pct) / 100.0f));
>- ncB = (int)(gdImageBlue (src, c) * (pct / 100.0f) + ((100 - pct) / 100.0f));
>+ ncR = (int)gdImageRed (src, c) * (pct / 100.0)
>+ + gdImageRed (dst, dc) * ((100 - pct) / 100.0);
>+ ncG = (int)gdImageGreen (src, c) * (pct / 100.0)
>+ + (int)gdImageGreen (dst, dc) * ((100 - pct) / 100.0);
>+ ncB = (int)gdImageBlue (src, c) * (pct / 100.0)
>+ + gdImageBlue (dst, dc) * ((100 - pct) / 100.0);
>
> /* Find a reasonable color */
> nc = gdImageColorResolve (dst, ncR, ncG, ncB);
>
>
>
>