im trying to create a thumbnal version of images that are in my directory but i can't seem to get it to work heres my coding
<?php
$im = imagecreatefromjpeg("http://localhost/toronto/image.jpg");
$x = imagesx($im);
$y = imagesy($im);
$desired_width = 60;
$desired_height = $y * ($desired_width/$x);
$new = imagecreatetruecolor($desired_width, $desired_height);
imagecopyresampled($new, $im, 0, 0, 0, 0, $desired_width, $desired_height, $x, $y);
imagedestroy($im);
echo "<div style='width: 100%; padding: 3px; border: 1px solid #000; background-color: green;'>" . imagejpeg($new, null, 85) . "</div>";
?>