im using the code
$srcImg = imagecreatefromjpeg("/img1/$filename");
$origWidth = imagesx($srcImg);
$origHeight = imagesy($srcImg);
$thumbWidth = 200;
$thumbHeight = 133;
$thumbImg = imagecreate($thumbWidth, $thumbHeight);
imagecopyresized($thumbImg, $srcImg, 0, 0, 0, 0, $thumbWidth, $thumbHeight, imagesx($thumbImg), imagesy($thumbImg));
imagejpeg($thumbImg, "$filename", "img1/thumbs", 100);
to generate a thumbnail
the $filename is passed via the URL and through to the database.
eg: 11694105066.jpg
the problem is that i keep getting:
Warning: imagecreatefromjpeg(/img1/11694105066.jpg) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /home/j****/public_html/members/thumbnailer.php on line 17
Warning: imagesx(): supplied argument is not a valid Image resource in /home/j****/public_html/members/thumbnailer.php on line 18
Warning: imagesy(): supplied argument is not a valid Image resource in /home/ji****/public_html/members/thumbnailer.php on line 19
Warning: imagecopyresized(): supplied argument is not a valid Image resource in /home/ji***/public_html/members/thumbnailer.php on line 25
Ive got a watermarkin script working file, so im guessing its not a problem with the server and just the script
David