kalle Tue, 04 Aug 2009 11:19:07 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=286796
Log: Revert and correct previous fix, this does not loose precision and convert back to int Changed paths: U php/php-src/trunk/ext/gd/gd.c Modified: php/php-src/trunk/ext/gd/gd.c =================================================================== --- php/php-src/trunk/ext/gd/gd.c 2009-08-04 11:15:37 UTC (rev 286795) +++ php/php-src/trunk/ext/gd/gd.c 2009-08-04 11:19:07 UTC (rev 286796) @@ -3956,10 +3956,10 @@ bg_al = gdImageAlpha(bg_img, _bg); for (i = 0; i < aa_steps; i++) { - rd = bg_rd + (int) (fg_rd - bg_rd) / aa_steps * (i + 1); - gr = bg_gr + (int) (fg_gr - bg_gr) / aa_steps * (i + 1); - bl = bg_bl + (int) (fg_bl - bg_bl) / aa_steps * (i + 1); - al = bg_al + (int) (fg_al - bg_al) / aa_steps * (i + 1); + rd = (int) (bg_rd + (double) (fg_rd - bg_rd) / aa_steps * (i + 1)); + gr = (int) (bg_gr + (double) (fg_gr - bg_gr) / aa_steps * (i + 1)); + bl = (int) (bg_bl + (double) (fg_bl - bg_bl) / aa_steps * (i + 1)); + al = (int) (bg_al + (double) (fg_al - bg_al) / aa_steps * (i + 1)); aa[i] = gdImageColorResolveAlpha(bg_img, rd, gr, bl, al); }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php