예제 #1
0
 public function create_thumb($name, $width, $height = null)
 {
     $handler = new image_handler_class();
     $handler->load(ROOT_DIR_NONE . $this->src);
     $thum_name = ROOT_DIR_NONE . $this->_thumb_name($this->src, $name);
     $handler->resize_image($thum_name, $width, $height);
     if (in_array($name, $this->thumb_names) === false) {
         $this->thumb_names[] = $name;
     }
 }
예제 #2
0
function create_thumb($name, $src, $width, $height = null)
{
    $handler = new image_handler_class();
    $handler->load(ROOT_DIR_NONE . $src);
    $handler->setImgCreateQuality(100);
    $thum_name = ROOT_DIR_NONE . thumb_name($src, $name);
    $handler->resize_image($thum_name, $width, $height);
}