[Phaos] PHPGD Help (TTF Glow)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

[Phaos] PHPGD Help (TTF Glow)

Post 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. :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

onion2k, a member and fairly frequent poster here, has written scripts that can perform blurs: viewtopic.php?t=40718
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

Post 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 :)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Blur a green text, then add the white text on top.
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

Post by R4000 »

This does look quite good,
Image


The only problem is aligning the text.
So i can have a larger blur..
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
User avatar
R4000
Forum Contributor
Posts: 168
Joined: Wed Mar 08, 2006 12:50 pm
Location: Cambridge, United Kingdom

Post 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 :)
Post Reply