示例#1
0
 public function resizeImage($source, $target, $confSuffix)
 {
     $dir = dirname($target);
     if (!file_exists($dir)) {
         mkdir($dir, 0777);
         chmod($dir, 0777);
     }
     $conf = self::getApplication()->getConfig();
     $img = new ImageManipulator($source);
     $img->setQuality($conf->get('IMG_O_Q_' . $confSuffix));
     $img->resize($conf->get('IMG_O_W_' . $confSuffix), $conf->get('IMG_O_H_' . $confSuffix), $target);
 }