Changeset 9127 for temp/trunk/data/class
- Timestamp:
- 2006/11/27 12:58:19 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/data/class/SC_Image.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/data/class/SC_Image.php
r9105 r9127 64 64 $zip_height = $src_h * $zip_scale; 65 65 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 73 66 // ¥Õ¥¡¥¤¥ë¤Î³ÈÄ¥»Ò¼èÆÀ 74 67 $arrFileInfo = pathinfo($file); … … 77 70 // °ì°Õ¤ÊID¤ò¼èÆÀ¤¹¤ë¡£ 78 71 $uniqname = date("mdHi") . "_" . uniqid(""); 79 72 80 73 // ¥Õ¥¡¥¤¥ë̾¡¢ÊݸÀèÀßÄê 81 74 $filename = $uniqname . "." . $extension; … … 87 80 case "jpg": 88 81 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 89 89 ImageJPEG($dst_im, $path); 90 90 break; 91 91 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 92 99 ImageGIF($dst_im, $path); 93 100 break; 94 101 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 95 109 ImagePNG($dst_im, $path); 96 110 break;
Note: See TracChangeset
for help on using the changeset viewer.
