I made some modifications while trying to get this to work and here is my code
<?php
if (isset($_GET["filename"])) $filename = $_GET["filename"];
// Percent Resized
$percent = 25;
// Path
$path = "images/models/".$_GET['modelID']."/products/";
// Get new sizes
list($width, $height) = getimagesize($path.$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);
// Save
imagejpeg($path.$thumb,"",100);
?>
This is the error I am recieving:
Fatal error: Allowed memory size of 25165824 bytes exhausted (tried to allocate 4500 bytes) in /data1/test/docs/jonathan/model/thumbnail.php on line 16
which is this line:
$thumb = imagecreatetruecolor($newwidth, $newheight);
Any Ideas???
I already got this code from another post that is already resolved and i'm now stuck.