I am working on a "thumbnail generator" with GD. I have the following code which is working fine for sending an image direct to the browser:
$dest = imagecreate($destWidth, $destHeight);
$src = imagecreatefromjpeg($srcImage);
imagecopyresampled ( $dest, $src, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight);
imagejpeg($dest);
if I change the last line to...
imagejpeg($dest, "myThumb.jpg");
..then I get an error.
Any ideas what I'm doing wrong?
thanks