Re: [GD-DEVEL] Drawing anti-aliased text with transparent background
| From: | Pierre | Date: | Sun, 18 Mar 2007 12:59:24 +0000 |
| Subject: | Re: [GD-DEVEL] Drawing anti-aliased text with transparent background | ||
| References: | 1 2 3 4 5 | Groups: | php.gd.devel |
| Request: | Send a blank email to php-gd-devel+get-143@lists.php.net to get a copy of this message | ||
On 3/18/07, Pierre <pierre.php@gmail.com> wrote:
HI Ethan, On 3/18/07, Ethan A Merritt <merritt@u.washington.edu> wrote: On Saturday 17 March 2007 11:54, Pierre wrote:Oops. Let me try again. It is not the transparent color or color index. The color of the pixels where the text is drawn is not opaque (alpha > 0). That's also good fun to get nice results when the destination pixels are not fully opaque or transparent, 127 distinct levels are not enough. --PierreOn 3/17/07, Andrei Stebakov <lispercat@gmail.com> wrote:Aha. That explains something that had been bothering me about some plots created by gnuplot. So if the user chooses TrueColor output and a transparent background, Please note that in my example it is a not the transparent color has a maximum alpha (gdAlphaTransparent).My goal is to create a .png image that has some text on a transparent background.Here you go: and the code: http://cvs.php.net/viewvc.cgi/gd/playground/text_on_transparent_background/text_aa_alpha.c?revision=1.2&view=markup Please remember that it will work for text but not other shapes. The antialiased lines always blend on the destination pixel, for now.