have tried a few different methods,
this is the one i have closest to working.
But it just crates a new copy of the files
with a modified name.
IT doesn't resize it though!
images;
http://pod-185.dolphin-server.co.uk/Reapit/hgasite/images/cloud.jpg
http://pod-185.dolphin-server.co.uk/Reapit/hgasite/images/thumb_cloud.jpg
@copy("$img1", "/Reapit/hgasite/images/$img1_name")
or die("Couldn't copy the file.");
$start = "/Reapit/hgasite/images/$img1_name";
$output = '/Reapit/hgasite/images/' . 'thumb' . '_' . $img1_name;
if (!copy($start, $output)){
echo "There was a problem while trying to upload your image.";
____exit;
}
$file_dir = "/Reapit/hgasite/images/";
$new_file = "/Reapit/hgasite/images/";
$image1 = "$img1";
$dest_width = "35";
$dest_height = "35";
$quality = "10";
if (is_uploaded_file($image1))
{
$src_img = imagecreatefromjpeg("$image1");
$dst_img=imagecreatetruecolor($dest_width,$dest_height);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, imageSX($src_img), imageSX($src_img));
imagejpeg($dst_img, "$new_file/$file_array[name]", $quality);
imagedestroy($src_img);
imagedestroy($dst_img);
}
else
{
echo "Something went wrong.";
}
and i get this error? but i don't think that's whats stopping it!
Warning: imagejpeg: unable to open '/Reapit/hgasite/images//' for writing in /Reapit/hgasite/upload/ks_do_uploadb.php on line 26
line 26 is;
imagejpeg($dst_img, "$new_file/$file_array[name]", $quality);