Re: [GD-DEVEL] Drawing anti-aliased text with transparent background
| From: | Pierre | Date: | Sat, 17 Mar 2007 18:54:11 +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-137@lists.php.net to get a copy of this message | ||
On 3/17/07, Andrei Stebakov <lispercat@gmail.com> wrote:
Sorry if I might appear repeating myself, but I need to make myself clear. My goal is to create a .png image that has some text on a transparent background. I need that image to look equally good placed on top of any other image regardless of its color or transparency. I can easily create such .png images with Gimp or Photoshop. So I wonder if it can be done with the library.Here you go: Result: http://blog.thepimp.net/public/images/gd/ttf/text_on_transparent_bgd.png 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. --Pierre