From: James Cox Date: Thu, 11 Jul 2002 04:36:22 +0000 (+0000) Subject: adding patch from http://www.coupin.net/gd-freetype/ which makes images anti aliased... X-Git-Tag: dev~361 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a234c521b9edf4065f6f5d930d509cabef060148;p=php adding patch from http://www.coupin.net/gd-freetype/ which makes images anti aliased (and therefore more readable). #this does actually work. --- diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index f2937b45d7..536b76672a 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -509,12 +509,12 @@ tweenColorFetch (char **error, void *key) 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 @@ gdft_draw_bitmap (gdImage * im, int fg, FT_Bitmap bitmap, int pen_x, int pen_y) } 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;