$destdate)) { global $ImageTool; $imgsize = GetImageSize($source); $width = $imgsize[0]; $height = $imgsize[1]; $new_width = $size; $new_height = ceil($size * $height / $width); if ($ImageTool == "gd") { $im = ImageCreateFromJPEG($source); $new_im = ImageCreate($new_width,$new_height); ImageCopyResized($new_im,$im,0,0,0,0,$new_width,$new_height,ImageSX($im),ImageSY($im)); ImageJPEG($new_im,$dest,75); } elseif ($ImageTool == "im") { system("$convert -quality 80 -antialias -sample $new_width" . "x" . "$new_height \"$source\" \"$dest\" 2>&1"); } } } function checkDir($pathname) { $darray = split("/",$pathname); for ($x = 1; $x < sizeof($darray); $x++) { $checkdir = ''; for($y = 1; $y <= $x; $y++) { $checkdir .= "/" . $darray[$y]; } if (file_exists($checkdir)) { } else { mkdir($checkdir,0755); } } } ?>