I am trying to save an image file to the server with imagepng. The code is as follows:
$base = imagecreatefrompng($_SERVER['DOCUMENT_ROOT'].'/base.png');
...
some code
...
Imagepng($base);
Imagepng($base, 'new.png');
It displays the image, but doesn't save it. Am i using imagepng right? I have tryed:
imagepng($base, $_SERVER['DOCUMENT_ROOT'].'/new.png');
but that doesn't work either.