Re: [GD-DEVEL] Drawing anti-aliased text with transparent background
[email protected] ("Andrei Stebakov")
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
BTW, if I select white as a transparent background color I got a text on a black color: http://www.greenpixeldesign.com/cphandler/tmp-img/test1.png Why does it happen? Thank you, Andrew On 3/17/07, Pierre <[email protected]> wrote: > > On 3/17/07, Andrei Stebakov <[email protected]> wrote: > > Gives me this resut: > > http://www.greenpixeldesign.com/cphandler/tmp-img/test.png > > > > I am using libgd 2.0.33 on debian, so basically I just create an image > from > > scratch, set transparent color to black and use gdImageStringFT to draw > to > > text. (I use lisp bindings to do that). What am I missing to remove the > > black outline from the text? > > The antialiasing is not 100% black, it does not match the transparent > color (or index). That's why they remain and appears ugly in anything > but a black background. If you want a white background, I suggest to > use it in your image as transparent color. > > 2.1.0 will support antialiasing using the alpha channel only when the > covered area is transparent. It will solve the problem as long as your > browser supports transparency/opacity in the png image (IE does not). > > --Pierre >