Is this ImageMagick or GD library?
Posted: Wed Oct 08, 2003 2:12 pm
Is the follow code snip using a GD library or imagemagick? Can you tell? Whatever it is, I need it installed on a server and don't know which to tell him to install.
Code: Select all
<?php
if(function_exists("imagecopyresampled")){
$newim = imagecreatetruecolor($newwidth, $newheight);
imagecopyresampled($newim, $im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
}else{
$newim = imagecreate($newwidth, $newheight);
imagecopyresized($newim, $im, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
}
ImageJpeg ($newim,$user_path . $upload_folder . $name . ".jpg", 93);
ImageDestroy ($newim);
}else{
ImageJpeg ($im,$user_path . $upload_folder . $name . ".jpg");
}
?>