Page 1 of 1
How to Make glitter graphix using php.
Posted: Sun May 11, 2008 2:56 am
by manjifera
Hi all can any one give me any idea How i can make gif animated text glitter graphix using php and classes?
I have created this using php
http://www.orkutscrap.byethost5.com/lovepain/love.htm

but not able to create like this
Thanks in advance...
Re: How to Make glitter graphix using php.
Posted: Sun May 11, 2008 3:35 am
by onion2k
Actually making the individual frames shouldn't be too hard, you'd just need to work out a nice way of making the text. imagettf() will do any TTF font but only in plain text.. you might be better off copying individual bitmap letters from separate files into a single image. I'll leave you to figure that out (because it's easy).
The glitter effect can be acheived with imagesetpixel() ... just generate random coordinates on the canvas and set that pixel (plus the surrounding ones) to the glitter colour.
Animating it is the hard bit. Fortunately there's a gif encoder class here:
http://phpclasses.gifs.hu/show.php?src= ... .class.php .. unfortunately there's no documentation for it though, but it is used in GIFbuilder that you can download from
http://phpclasses.gifs.hu/show.php?page=0 and examine. It's not
that complicated...
You should note that using a photo background in a gif will make a MASSIVE file and it'll look pretty horrible because it'll only be 256 colours (GIFs can have more, but it's very complicated, and well beyond the scope of this thread).