ok, I am having an off day, I admit...I got this script off codewalkers this
morning (cheating, I know)

<?php

//phpinfo();
function thumbnail($i,$nw,$p,$nn) {
    $img=imagecreatefromjpeg("$i");
    $ow=imagesx($img);
    $oh=imagesy($img);
    $scale=$nw/$ow;
    $nh=ceil($oh*$scale);
    $newimg=imagecreate($nw,$nh);
    imagecopyresized($newimg,$img,0,0,0,0,$nw,$nh,$ow,$oh);
    imagejpeg($newimg, $p.$nn);
    return true;
}

#thumbnail(filetouse,newwidth,newpath,newname);
thumbnail("images/maddy.jpg",100,"/images/","t_maddy.jpg");
?>

I now have php 4.3.2 and I get the error "call to undefined function
imagecreatefromjpeg()".  Isn't php4.3.2 compiled with the gd library or do I
have to do something explicitely to use it?

Thanks,
Eddie


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

Reply via email to