cvs: php4 /ext/gd/libgd gdft.c

From: Date: Thu, 11 Jul 2002 04:36:22 +0000
Subject: cvs: php4 /ext/gd/libgd gdft.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12777@lists.php.net to get a copy of this message
imajes Thu Jul 11 00:36:22 2002 EDT Modified files: /php4/ext/gd/libgd gdft.c Log: adding patch from http://www.coupin.net/gd-freetype/ which makes images anti aliased (and therefore more readable). #this does actually work. Index: php4/ext/gd/libgd/gdft.c diff -u php4/ext/gd/libgd/gdft.c:1.2 php4/ext/gd/libgd/gdft.c:1.3 --- php4/ext/gd/libgd/gdft.c:1.2 Sun Apr 21 09:48:22 2002 +++ php4/ext/gd/libgd/gdft.c Thu Jul 11 00:36:22 2002 @@ -509,12 +509,12 @@ is incorporate our knowledge of the percentage of this pixel that is really "lit" by pushing the alpha value up toward transparency in edge regions. */ - a->tweencolor = gdTrueColorAlpha ( + a->tweencolor = gdAlphaBlend(bg, gdTrueColorAlpha ( gdTrueColorGetRed (fg), gdTrueColorGetGreen (fg), gdTrueColorGetBlue (fg), - gdAlphaMax - ((gdAlphaMax - gdTrueColorGetAlpha (fg)) * pixel / NUMCOLORS) - ); + gdAlphaMax - ((gdAlphaMax - gdTrueColorGetAlpha (fg)) * pixel / NUMCOLORS)) + ); } else { @@ -604,7 +604,7 @@ } else { pixel = &im->pixels[y][x]; - if (tc_key.pixel == NUMCOLORS) + if (tc_key.pixel == NUMCOLORS && gdTrueColorGetAlpha(fg) ==0) *pixel = fg; else { tc_key.bgcolor = *pixel;

« previous php.cvs (#12777) next »