שינוי גודל תמונה.

nitm

New member
שינוי גודל תמונה.

שלום. אני מנסה ליצור גירסה מוקטנת לתמונה וכתבתי את הקוד הבא: [resizeimg.php]
<?php $filename = "images/pictures/" . $_GET['name']; list($width, $height) = getimagesize($filename); if ($width > $height){ $newwidth = 150; $newheight = $height * $width / 100; } else{ $newheight = 150; $newwidth = $height * $width / 100; } header('Content-type: image/jpeg'); $thumb = imagecreate($newwidth, $newheight); $source = imagecreatefromjpeg($filename); imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); imagejpeg($thumb); imagedestroy($thumb); ?>​
הבעיה היא שאני מקבל את השגיאה הבאה:
Fatal error: Call to undefined function: imagecreate()​
מה הבעיה??? זאת שיטה קיימת גם ב php 4 (מה שיש לי).... אז למה זה קור ה? תודה.
 
למעלה