I put together a function to resize uploaded images. It worked fine in php3, but now in php4 using GD library version "between 1.3 and 1.6.1" (as phpinfo() says), I get the following error:
Warning: imagegif: unable to open '7.gif' for writing in functions.php4 on line 38
ImageGif() is being used in the following context:
function
resize($sourceimage,$destinationimage, $newwidth, $newheight){
$oldimage = ImageCreateFromGif($sourceimage);
$size = GetImageSize($sourceimage);
$newimage = ImageCreate($newwidth,$newheight);
ImageCopyResized($newimage, $oldimage, 0,0,0,0,$newwidth,$newheight,$si$
ImageGif($newimage, $destinationimage);
}
Does anyone know what the problem is?