Hi all,
Having a thick day so my question a newbe one.
I have a small script that creates a thumbnail image and I want to save the image name so I can upload it to my server.
The script I am using is:
// The file
$filename = 'item_images/web/S21/S21a.jpg';
$percent = 0.4;
// Content type
header('Content-Type: image/jpeg');
// Get new dimensions
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;
// Resample
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
// Output
$FileName = imagejpeg($image_p, null, 100);
I can echo out the image to the screen by how can I save the result in to a variable for upload.
Many thanks in advance for any help you can provide.
Blackbox