Re: [GD-DEVEL] Drawing anti-aliased text with transparent background
[email protected] (Pierre)
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Andrei, On 3/17/07, Andrei Stebakov <[email protected]> wrote: > Pierre, I need to create a png image with a transparent background so that > when I put this image on top of any other image of _any_ color only the text > will show. Yes, I understood that. That's why I added the comment about alpha based antialiasing. That's what photoshop or gimp do. > The text outline should look smooth without any fringes. I know > when I create a transparent PNG in any graphic program like Photoshop I > don't have to pick an anti-aliased color. AFIK, only gif needs a particular > color for anti-aliasing. > Could you please, enlighten me what we are missing in GD (how it works) and > if I can get the result that we are talking about? Check the list archive, I remember a script to convert the antialias to alpha. The idea is to draw a text using white on a temporary image. Then you can convert the white levels to alpha while copying the temporary image to the final image. I can create a C or PHP example to do it if you like later tonight :). --Pierre