Alright, so I have found code that does image size reduction well.
<code>
<?php
// File and new size
$filename = 'test.jpg';
$percent = 0.5;
// Content type
header('Content-type: image/jpeg');
// Get new sizes
list($width, $height) = getimagesize($filename);
$newwidth = $width $percent;
$newheight = $height $percent;
// Load
$thumb = imagecreatetruecolor($newwidth, $newheight);
$source = imagecreatefromjpeg($filename);
// Resize
imagecopyresampled($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
// Output
imagejpeg($thumb,$save_to,100);
?>
</code>
Pretty standard and it works well ... on its own. But if there is anything else on the page, like text, it outputs
The image “...photo_folder_open.php” cannot be displayed, because it contains errors.
or it just doesn't dislpay the text at all.
Probably because of the header call --> header('Content-type: image/jpeg'). But why does the entire page have to be that content type. I would like to be able to do something like <img src='$save_to'> and have it print out the size modified jpeg.
Although I have been reading that the $save_to variable is the 'file' that should be receiving the JPG data I can't seem to get it to output after it has been "written to".