GD - dynamic PNG generation

From: Date: Mon, 25 Feb 2002 13:05:54 +0000
Subject: GD - dynamic PNG generation
Groups: php.general 
Request: Send a blank email to php-general+get-86079@lists.php.net to get a copy of this message
I'm currently using the GD extension to generate dynamic PNG's containing text, that should eventually be coming from a database. the deal is, it seems to take a long time, which is probably my own fault, seeing that I'm generating so much text. I am generating an image containing approx 160 lines of text, and it takes about 20seconds to create, this unfortunatley is too long for me. I was wondering if this is a common time with GD or if I am doing something wrong. Coding wise, I currently read the text in from a file, then put the text into an array, each line being a seperate entry in the array. I then create a PNG image approx 490*1848(i change the image size depending on the amount of text). I dont do anything really strange in my image function, apart from performing a wordwrap on the text before i start displaying it, just to make the image readable. ideally I would like this to come in considerably quicker. that said, if this is going to be used, it will probably done as a cron job, so if need be I will have toaccept it being super slow. any help is appreciated bros Conor

« previous php.general (#86079) next »