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:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 12:40 PM
> To: [EMAIL PROTECTED]
> 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
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to