RE: [PHP] PHP to create static images

From: Date: Mon, 24 Jun 2002 20:58:09 +0000
Subject: RE: [PHP] PHP to create static images
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-103669@lists.php.net to get a copy of this message
To save an image to disk with the imagepng/imagejpg/imagewbmp functions all you have to do is give the file name as the second parameter to the function; so if you wanted to call the first graph 'graph1.png', it would go something like <?php $graph = imagecreate(320,240); /* (Draw the graph here) */ imagepng($graph, 'graph1.png'); ?> imagepng will attempt to save graph1.png in the same directory as the script. Where ever you tell it to save the image, make sure your web server (if Apache - I don't know about IIS) has permission to write files to that directory. -Andy > -----Original Message----- > From: Campano, Troy [mailto:Troy.Campano@LibertyMutual.com] > Sent: Monday, June 24, 2002 12:40 PM > To: php-general@lists.php.net > Subject: [PHP] PHP to create static images > > > I am doing some work with creating graphs using the GD library. > > Does anyone know how I can create the graphs statically so I can > save the output as a GIF or PNG? > > > I want to run a script that will take in say 10 datasets and then > create 10 PNG images on the file server. > > > > Any ideas? > > > thank you! > > > Troy Campano >

« previous php.general (#103669) next »