function makeThumb($src_file, $width, $height, $dst_file)
 {
     $objThumb = new gdthumb();
     $ret = $objThumb->Main($src_file, $width, $height, $dst_file);
     if ($ret[0] != 1) {
         // エラーメッセージの表示
         echo $ret[1];
         exit;
     }
     return basename($ret[1]);
 }
예제 #2
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objThumb = new gdthumb();
     $objBlob = new SC_Helper_Blob_Ex();
     $file = NO_IMAGE_REALDIR;
     // NO_IMAGE_REALDIR以外のファイル名が渡された場合、ファイル名のチェックを行う
     if (strlen($_GET['image']) >= 1 && $_GET['image'] !== NO_IMAGE_REALDIR) {
         // ファイル名が正しく、ファイルが存在する場合だけ、$fileを設定
         if (!$this->lfCheckFileName()) {
             GC_Utils_Ex::gfPrintLog('invalid access :resize_image.php $_GET[\'image\']=' . $_GET['image']);
         } else {
             $objBlob->getBlob("saveimage", $_GET['image'], IMAGE_TEMP_REALDIR . $_GET['image']);
             $file = IMAGE_TEMP_REALDIR . $_GET['image'];
         }
     }
     $ret = $objThumb->Main($file, $_GET['width'], $_GET['height'], "", true);
 }
예제 #3
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objThumb = new gdthumb();
     $file = NO_IMAGE_DIR;
     // NO_IMAGE_DIR以外のファイル名が渡された場合、ファイル名のチェックを行う
     if (isset($_GET['image']) && $_GET['image'] !== NO_IMAGE_DIR) {
         // ファイル名が正しい場合だけ、$fileを設定
         if ($this->lfCheckFileName() === true) {
             $file = IMAGE_SAVE_DIR . $_GET['image'];
         } else {
             GC_Utils_Ex::gfPrintLog('invalid access :resize_image.php $_GET["image"]=' . $_GET['image']);
         }
     }
     if (file_exists($file)) {
         $objThumb->Main($file, $_GET["width"], $_GET["height"], "", true);
     } else {
         $objThumb->Main(NO_IMAGE_DIR, $_GET["width"], $_GET["height"], "", true);
     }
 }
예제 #4
0
 /**
  * 画像の出力
  *
  * @param string $file 画像ファイル名
  * @param integer $width 画像の幅
  * @param integer $height 画像の高さ
  * 
  * @return void
  */
 function lfOutputImage($file, $width, $height)
 {
     $objThumb = new gdthumb();
     $objThumb->Main($file, $width, $height, '', true);
 }