Dynamic Text Graphics w/ Apache? 6
An Anonymous Internet Freak asks:
"I have recently been made aware of a very useful feature in Roxen Webserver. It allows you to embed text into a html document, which the server coverts to a graphic containing that text. Eg. I want a button that says 'Home', so I include a command within the HRML code. As the page goes through the server, it dynamically creates an image containing that 'Home' at the defined size/colour etc. Can Apache do the same?" It shouldn't be too hard to do something like this in Perl with an early version of GD. Watch out for the
licensing police, however! What do you all think? Is there a better solution?
try WML (Score:1)
--
W.A.S.T.E.
Or PHP (Score:1)
It was not hard to put together, although it is not currently in a ready-to-distribute state.
To stick graphic text in, I do something like this, using brackets instead of braces to slashdot doesn't nuke it:
[img src="/text.php?text=Hello+World&size=15"]
It's not as seamless as what Roxen does, but it works fine.
As the question points out, it has to use an old GD that has GIF support.
I did this in PHP too. (Score:1)
function pngtext($textstr) {
}
};
(Wow, that would have been *much* easier if <pre> was allowed. I did that with nested <blockquote>s.)
PHP3 also has functions for generating graphics on the fly. They are described at www.php.net [php.net].
I've seen Perl scripts that generate graphics on the fly, so if you're more versed in that, try it out.
Use Perl Gimp and write a Perl CGI (Score:1)
--
http://www.wholepop.com/ [wholepop.com]
Whole Pop Magazine Online - Pop Culture
This is trivial in Java Servlets (Score:1)
Java Servlets are also much more efficient than Perl CGI. You don't want to bog down your server for a cute little graphic effect!