Changeset 9201 for temp/trunk/data
- Timestamp:
- 2006/11/27 19:38:52 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/data/class/SC_Image.php (modified) (2 diffs)
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 // °µ½ÌΨ»ØÄê
Note: See TracChangeset
for help on using the changeset viewer.
