Ok, that's reasonable. My only suggestion would be to cache the images that your script generates. A good way to do this is to md5 or otherwise hash the arguments to the PNG generation code and then have the code search for a file in a specified directory (/tmp/generated_pngs for instance) with that name before calling gd, if it exists just read out that file, otherwise generate a new one and place it in the directory. This will lower your overhead without adding too much complexity. To spray out the cached version of your PNG use readfile() or something similar.
-Javier -----Original Message----- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED] Sent: Saturday, November 08, 2003 11:57 PM To: Javier Muniz Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Beveled text Javier Muniz wrote: >Interesting, is this for a website? If so have you tried doing the >same thing with CSS? Using CSS you could make the site load faster and >be more accessible (for instance, you can allow users to choose their >own font size, and make it easier for page readers to handle your >page). > When I originally created the script, it was simply an exercise, to see if I could do it. However, I have since then incorporated it into a site design of mine, where I wanted the headers to be images, dynamically created. So yes, for each page that loads, each header calls this script which then spits out the PNG data. Large overhead, simply because I never bothered looking into doing it with CSS, and also because outputting a PNG image I'm guaranteed it will work, and it will look the way I want it to look (both font type, as well as with layout positioning,) as opposed to dealing with broken browsers and people not seeing the same thing. And also because I can use my fonts, instead of relying on the user having a particular font installed on their system. -- H| I haven't lost my mind; it's backed up on tape somewhere. +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 IT Director / SysAdmin / WebSmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php