Changeset 9127 for temp/trunk/data/class


Ignore:
Timestamp:
2006/11/27 12:58:19 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/data/class/SC_Image.php

    r9105 r9127  
    6464        $zip_height = $src_h * $zip_scale; 
    6565         
    66         //¸µ²èÁü 
    67         $src_im = ImageCreateFromJPEG($file); 
    68          
    69         // °µ½ÌÀè²èÁü 
    70         $dst_im = imagecreatetruecolor($zip_width, $zip_height);     
    71         imagecopyresampled($dst_im, $src_im, 0, 0, 0,0, $zip_width, $zip_height, $src_w, $src_h); 
    72  
    7366        // ¥Õ¥¡¥¤¥ë¤Î³ÈÄ¥»Ò¼èÆÀ  
    7467        $arrFileInfo = pathinfo($file); 
     
    7770        // °ì°Õ¤ÊID¤ò¼èÆÀ¤¹¤ë¡£ 
    7871        $uniqname = date("mdHi") . "_" . uniqid(""); 
    79  
     72         
    8073        // ¥Õ¥¡¥¤¥ë̾¡¢ÊݸÀèÀßÄê 
    8174        $filename = $uniqname . "." . $extension; 
     
    8780                case "jpg": 
    8881                case "jpeg": 
     82                    //¸µ²èÁü 
     83                    $src_im = ImageCreateFromJPEG($file); 
     84                     
     85                    // °µ½ÌÀè²èÁü 
     86                    $dst_im = imagecreatetruecolor($zip_width, $zip_height);     
     87                    imagecopyresampled($dst_im, $src_im, 0, 0, 0,0, $zip_width, $zip_height, $src_w, $src_h); 
     88                     
    8989                    ImageJPEG($dst_im, $path); 
    9090                    break; 
    9191                case "gif": 
     92                    //¸µ²èÁü 
     93                    $src_im = ImageCreateFromGIF($file); 
     94                     
     95                    // °µ½ÌÀè²èÁü 
     96                    $dst_im = imagecreatetruecolor($zip_width, $zip_height);     
     97                    imagecopyresampled($dst_im, $src_im, 0, 0, 0,0, $zip_width, $zip_height, $src_w, $src_h); 
     98                     
    9299                    ImageGIF($dst_im, $path); 
    93100                    break; 
    94101                case "png": 
     102                    //¸µ²èÁü 
     103                    $src_im = ImageCreateFromPNG($file); 
     104                     
     105                    // °µ½ÌÀè²èÁü 
     106                    $dst_im = imagecreatetruecolor($zip_width, $zip_height);     
     107                    imagecopyresampled($dst_im, $src_im, 0, 0, 0,0, $zip_width, $zip_height, $src_w, $src_h); 
     108                     
    95109                    ImagePNG($dst_im, $path); 
    96110                    break; 
Note: See TracChangeset for help on using the changeset viewer.