- Timestamp:
- 2006/11/27 10:54:15 (20 years ago)
- Location:
- temp/trunk
- Files:
-
- 3 edited
-
data/class/SC_Image.php (modified) (1 diff)
-
html/admin/products/product.php (modified) (1 diff)
-
html/test/kakinaka/resize_image.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/data/class/SC_Image.php
r5934 r9090 51 51 } 52 52 } 53 54 // ³ÈÂçΨ¤ò»ØÄꤷ¤Æ²èÁüÊݸ 55 function saveResizeImage($file, $zip_scale = 1) { 56 // ¥Ç¥£¥ì¥¯¥È¥ê¼èÆÀ 57 $dir = dirname($file); 58 59 // ¸µ²èÁü¥µ¥¤¥º¤ò¼èÆÀ 60 list($src_w, $src_h) = getimagesize($file); 61 62 // °µ½ÌΨ»ØÄê 63 $zip_width = $src_w * $zip_scale; 64 $zip_height = $src_h * $zip_scale; 65 66 // °µ½ÌÀè²èÁü 67 $dst_im = imagecreatetruecolor($zip_width, $zip_height); 68 imagecopyresampled($dst_im, $file, 0, 0, 0,0, $zip_width, $zip_height, $src_w, $src_h); 69 70 // ²èÁü½ÐÎÏ 71 // header("Content-Type: image/gif"); 72 // ImageGIF($dst_im); 73 // ImageDestroy($dst_im); 74 75 // °ì°Õ¤ÊID¤ò¼èÆÀ¤¹¤ë¡£ 76 $uniqname = date("mdHi") . "_" . uniqid(""); 77 $filename = $uniqname . ".gif"; 78 $path = $dir . $filename; 79 if(is_dir($dir)) { 80 ImageGIF($dst_im, $path); 81 return $path; 82 } 83 84 print("²èÁü¤ÎÊݸ¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£"); 85 return ""; 86 } 53 87 } 54 88 ?> -
temp/trunk/html/admin/products/product.php
r9088 r9090 124 124 $objPage->arrErr[$_POST['image_key']] = $objUpFile->makeTempFile($_POST['image_key']); 125 125 126 $objPage->arrErr[$_POST['image_key']] = $objUpFile->makeTempFile("main_list_image");126 // Ãæ¡¢¾®²èÁüÀ¸À® 127 127 128 128 sfprintr($_POST['image_key']); -
temp/trunk/html/test/kakinaka/resize_image.php
r9089 r9090 4 4 5 5 $objView = new SC_UserView("./templates/"); 6 $objImage = new SC_Image( );6 $objImage = new SC_Image(IMAGE_TEMP_DIR); 7 7 8 8
Note: See TracChangeset
for help on using the changeset viewer.
