Re: IMAGECOPYRESIZED(); DOESN'T WORK...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/1/06, BBC <bbc_danang@xxxxxxxxxx> wrote:
I thought I have typed this function correctly, and I didn't know why my
browser couldn't run these script :
<?php
$filename = 'test.jpg';
$percent = 0.5;
header('Content-type: image/jpeg');
list($width, $height) = getimagesize($filename);
$newwidth = $width * $percent;
$newheight = $height * $percent;
$thumb = imagecreatetruecolor($newwidth, $newheight);  //1*ERROR
$source = imagecreatefromjpeg($filename);              //2*ERROR
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width,
$height); //3*ERROR
imagejpeg($thumb);
?>
and the error output is : "call to undefined function"
btw, I'm using PHP 4.1.1. Is there any possible that my PHP version can not
run those script?
So, what is the best solution for my problem..?

PHP doesn't have the GD library installed or loaded.

Create a phpinfo page:

<?php
phpinfo();
?>

there needs to be a big "GD" section.
--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux