Hi guys,
I am writing this code so it takes a large image and creates a thumbnail in a different folder, eventuallly this will be part of a database submission but to debug I am writing hard code.
The error I get is:
Warning: imagejpeg: unable to open '../product_thumbs/Datanet.jpg' for writing in /home/httpd/html/v-clients/londontoycompany/admin/product-add.php on line 49
the code is:
$size = GetImageSize("../product_images/Datanet.jpg");
$i = sprintf("%.0f", $size[0]/10);
$t = sprintf("%.0f", $size[1]/10);
$im_in = ImageCreateFromJPEG("../product_images/Datanet.jpg");
$im_out = ImageCreate($i, $t);
#echo $im_in."<br>";
#echo $i."<br>";
#echo $t."<br>";
ImageCopyResized ($im_out, $im_in, 0, 0, 0, 0, $i, $t, $size[0], $size[1]);
ImageJPEG($im_out, "../product_thumbs/Datanet.jpg");
#echo $im_out."<br>";
#ImageDestroy($im_in);
#ImageDestroy($im_out);
offending line is:
($im_out, "../product_thumbs/Datanet.jpg");
Any help would be great.
TIA