Re: Re: GD - dynamic PNG generation

From: Date: Mon, 25 Feb 2002 18:30:35 +0000
Subject: Re: Re: GD - dynamic PNG generation
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-86132@lists.php.net to get a copy of this message
hmm, sounds like a good idea, i'll give it a try. it seems too, that if i dont break up my text, i.e. print all of it in one long line, it runs a lot faster i'm running this under Win2k, i got a PIII i dunno how many mhz(it's a college PC, and everything is locked down on me) but i'd guess at 800mhz or something like that. i think i'm also running about 256mb or ram. so my specs are pretty good, i would imagine. i'll look into the multiple images soloution. cheers i'll get back to y'all with my results. Conor On Mon, Feb 25, 2002 at 01:21:42PM -0500, Michael Kimsal wrote: > Holy cow that's a big graphic. > > 20 seconds does sound a tad long, but might not be depending on the > server and memory - what are the specs? > > What might possibly speed it up a bit is to create multiple small > versions first (20 one line graphics, for example) and build them all > together at the end by loading and copying into the final large area - > this MIGHT cut down time a bit, because all the drawing operations would > take place against a smaller memory area. Just a hunch though. > > > > > Conor McTernan wrote: > >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 > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#86132) next »