Changeset 9201
- Timestamp:
- 2006/11/27 19:38:52 (20 years ago)
- Location:
- temp/trunk
- Files:
-
- 2 edited
-
data/class/SC_Image.php (modified) (2 diffs)
-
html/resize_image.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/data/class/SC_Image.php
r9196 r9201 53 53 54 54 // ³ÈÂçΨ¤ò»ØÄꤷ¤Æ²èÁüÊݸ 55 function saveResizeImage($file, $to_w = 1, $to_h = 1, $header = false) {55 function saveResizeImage($file, $to_w = 0, $to_h = 0, $header = false) { 56 56 // ¥Ç¥£¥ì¥¯¥È¥ê¼èÆÀ 57 57 $dir = dirname($file); … … 60 60 list($from_w, $from_h) = getimagesize($file); 61 61 62 // Éý¤Î½Ì¾®Î¨ 63 ($to_w < $from_w) ? $wscale = $to_w / $from_w : $wscale = 1; 64 // ¹â¤µ¤Î½Ì¾®Î¨ 65 ($to_h < $from_h) ? $hscale = $to_h / $from_h : $hscale = 1; 66 // ½Ì¾®Î¨¤Ï¾®¤µ¤¤¤Û¤¦¤Ë¤¢¤ï¤»¤ë 67 ($wscale < $hscale) ? $scale = $wscale : $scale = $hscale; 62 if($to_w == 0 or $to_h == 0){ 63 $scale = 1; 64 }else{ 65 // Éý¤Î½Ì¾®Î¨ 66 ($to_w < $from_w) ? $wscale = $to_w / $from_w : $wscale = 1; 67 // ¹â¤µ¤Î½Ì¾®Î¨ 68 ($to_h < $from_h) ? $hscale = $to_h / $from_h : $hscale = 1; 69 // ½Ì¾®Î¨¤Ï¾®¤µ¤¤¤Û¤¦¤Ë¤¢¤ï¤»¤ë 70 ($wscale < $hscale) ? $scale = $wscale : $scale = $hscale; 71 } 68 72 69 73 // °µ½ÌΨ»ØÄê -
temp/trunk/html/resize_image.php
r9200 r9201 12 12 header("Content-Type: image/gif"); 13 13 $image = ImageCreateFromGIF(NO_IMAGE_URL); 14 /*imagecopyresampled($dst_im, $src_im, 0, 0, 0,0, $zip_width, $zip_height, $from_w, $from_h);14 imagecopyresampled($dst_im, $src_im, 0, 0, 0,0, $zip_width, $zip_height, $from_w, $from_h); 15 15 Imagegif($image); 16 16 ImageDestroy($image); 17 */18 17 ImageGIF($image); 19 18 ImageDestroy($image);
Note: See TracChangeset
for help on using the changeset viewer.
