View Full Version : How could I do a text-to-image sort of thing with php???
i just saw something that beetle said about a text-to-image thing using php in a different forum and I was wondering how I would b able 2 do that. Thanks for any hlp!:p
04-18-2003, 06:07 PM
You will have to use the GD functions. I don't know much about these myself, but you could look at www.php.net.
I know Okki (I hope it's spelt like that) is very good with gd.
04-18-2003, 07:33 PM
Sorry, My knowledge goes as far as knowing it is called gd :D
I should look in to it more...
04-18-2003, 08:44 PM
GD is the image manipulation php module. U shoulddownload the php manual (about 16 megs pdf file) and take a look. The gd functions are not hard to use. Good luck!
GD (generally bundled image libraries available from boutell.com) handles writing text over images quite competently, especially in newer builds - anti-aliases on truecolour ping files since 2.0.5 or so.
Your GD build (if you have it) should be compiled with the truetype libraries available from freetype.org - else you will be restricted to using system fonts and imagestring() which just doesn't quite have the ooompppfh
[rant mode on]
the GD libraries process all image rendering by converting the image to a format called .gd (or .gd2 in newer builds)
which is quite resource hungry.
therefore - dynamically creating images at every page load is something to avoid like the proverbial. If you can, preprocess any images and save a server copy somewhere and just link to that.
failing that - perhaps preprocess the background image and save it as .gd2 or .gd which, though larger filesize than most public formats, will speed up the scripts and lower the resources used.
[rant mode off]
if you have tested your php build and have GD compiled
and want a test script, just ask.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.