Ok here is the problem now, I am trying to resize a file that is already on my server, then move it to another folder.
This is what works so far, I copy original file to a temp directory, attempt to resize, and then move it to a new directory and then delete all temp files.
What doesn't work is my attempt to resize! Here is the code:
//...lines of code copying original file to a temp directory (WORKS)
$tmp_image = FULL_PATH . 'temp/' . $tmp_name;
//get width and height
$dimensions = getimagesize($tmp_image);
$width = $dimensions[0];
$height = $dimensions[1];
$new_width = 100; //new resize width
$new_height = 100; //new resize height
//resize temp image
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($tmp_image);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
//...lines of code to move newly resized $tmp_image to desired directory (WORKS)
The thing is... for some reason $tmp_image doesn't really get resized so when I copy it again to a new directory, it is still the same size.