Click to See Complete Forum and Search --> : GD Lib Image to a file
aestheticdecept
10-15-2003, 07:30 PM
i have a gdlib script that works perfectly. it's great, it's wonderful, only one problem. i need to put the image it creates into a file. i tried a copy function that copied the end gdlib image into a file but no dice. perhaps i used it incorrectly? anyway, does anybody know of a way to make a gdlib image into an image file?
PunkSktBrdr01
10-15-2003, 08:19 PM
When you use the imagejpeg() (http://us4.php.net/manual/en/function.imagejpeg.php) or imagepng() (http://us4.php.net/manual/en/function.imagepng.php) functions to create the image, the second argument is the name of the file to output it to, such as
<?
$image1 = imagecreate($x, $y);
imagepng($image1, "image1.png");
?>
aestheticdecept
10-15-2003, 08:24 PM
thank you PunkSktBrdr01, i figured my problem was something simple. ^_^