hi
ive coded with help an php image resize code, to go in upload.php, ill show:
can any1 help me fix these errors:
Thx
[/B]
ive coded with help an php image resize code, to go in upload.php, ill show:
PHP:
include"imagecfg.php";
//Make a 90x90px thumbnail......
$fulluploadlPath = $thumbDir.$name;
$img = imagecreatefromjpeg($fulluploadlPath);
$img = imagecreatefrompng($fulluploadlPath);
$img = imagecreatefromgif($fulluploadlPath);
if (!$img) { echo "<h1>Error: Couldn't open image to create thumbnail!</h1>" ; }
else {
$newW = round(($thumbPixels / $height) * $width); //thumnail width
$newImg = imagecreatetruecolor ($newW, $thumbPixels);
imagecopyresampled ($newImg, $img, 0, 0, 0, 0, $newW, $thumbPixels, $width, $height);
$thumbfilename = $thumbDir .'/'. $thumbName;
imagejpeg($newImg, $thumbnName) or die("<h1>Error: Couldn't save thumnbail!</h1>");
echo "<img src='$thumbName'>" ;
}
can any1 help me fix these errors:
Code:
[B]Warning[/B]: imagecreatefromjpeg(images/thumbs/1310586947.png) [[URL="http://localhost/function.imagecreatefromjpeg"]function.imagecreatefromjpeg[/URL]]: failed to open stream: No such file or directory in [B]C:\wamp\www\includes\imageupload.php[/B] on line [B]28[/B]
[B]Warning[/B]: imagecreatefrompng(images/thumbs/1310586947.png) [[URL="http://localhost/function.imagecreatefrompng"]function.imagecreatefrompng[/URL]]: failed to open stream: No such file or directory in [B]C:\wamp\www\includes\imageupload.php[/B] on line [B]29[/B]
[B]Warning[/B]: imagecreatefromgif(images/thumbs/1310586947.png) [[URL="http://localhost/function.imagecreatefromgif"]function.imagecreatefromgif[/URL]]: failed to open stream: No such file or directory in [B]C:\wamp\www\includes\imageupload.php[/B] on line [B]30
Thx
[/B]