Page 1 of 1

[Phaos] PHPGD Help (TTF Glow)

Posted: Wed Mar 08, 2006 1:02 pm
by R4000
Hello guys, i'm new here. Not new to PHP though, i've been developing for years.
This is pretty much the first time i've had to ask for PHP help on forums! (Not my first time on forums though).

Basicly what i would like a little bit of help on, is a Radial Glow.

As shown in the picture below.
Image
(picture looks rubish on the forum background, view on black background)

I would like to be able to create these images dynamicly, any ideas?
The font is a TTF font and i can do most of this, i'm just stuck on the glow part.

I'm starting to think the only way to do it, would to create a 'sticky pixel' system.
That would search for the edges of the text and stick a pixel to it, then will decrease the color brightness and loop to stick onto the new pixels and the loop agian...

My only problem with this is my server's memory limit, it is set VERY low.
I can run the PHP scripts via shell, and i plan to.
All images will be stored as pictures after creation and won't need to be recreated.

I will be very gratefull for your help. :)

Posted: Wed Mar 08, 2006 1:19 pm
by feyd
onion2k, a member and fairly frequent poster here, has written scripts that can perform blurs: viewtopic.php?t=40718

Posted: Wed Mar 08, 2006 1:28 pm
by R4000
Thanks for the link, but this isn't really what i needed!

I'll have a play with it, but i'm still looking for suggestions if people have any :)

Posted: Wed Mar 08, 2006 1:34 pm
by feyd
Blur a green text, then add the white text on top.

Posted: Wed Mar 08, 2006 1:57 pm
by R4000
This does look quite good,
Image


The only problem is aligning the text.
So i can have a larger blur..

Posted: Wed Mar 08, 2006 3:34 pm
by feyd
you should be able to adjust the convolution array outward to create a larger blur, although I don't know if onion2k's code supports a more dynamic convolution array or not.

Posted: Wed Mar 08, 2006 3:38 pm
by R4000
I have modifed it as much as i think is possible without distorting it,
I'm thinking of just forgeting the idea and use static images.

But thats the n00b way of doing it :)