creating images to files

From: Date: Sat, 06 Oct 2001 18:39:27 +0000
Subject: creating images to files
Groups: php.general 
Request: Send a blank email to php-general+get-70240@lists.php.net to get a copy of this message
Hi. I'm have a problem creating images to files. I can create and display images with this code: <? Header("Content-type: image/png"); $im = imageCreateFromPng("image.png"); ImagePng($im); ImageDestroy($im); ?> But i want to save the image to a file. I have tried the follwing code but I get "Warning: imagepng: unable to open 'pic.png' for writing in /public_html/imgtest.php on line 11". <?php $im = imageCreateFromPng("image.png"); ImagePNG($ im,"pic.png"); ImageDestroy($im); ?> <img src="pic.png" border=0> </body> </html> (Line 11 is "ImagePNG($ im,"pic.png");") Anyone? Robert

« previous php.general (#70240) next »