Changeset 21441 for branches/version-2_12-dev/data/class/SC_Image.php
- Timestamp:
- 2012/02/06 11:05:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_Image.php
r21420 r21441 100 100 if ($tmpMH) $MH = $tmpMH; // $MHに最大縦幅セット 101 101 102 if (empty($FromImgPath) || empty($ToImgPath)) {102 if (empty($FromImgPath) || empty($ToImgPath)) { 103 103 return array(0,"出力元画像パス、または出力先フォルダが指定されていません。"); 104 104 } 105 105 106 if (!file_exists($FromImgPath)) {106 if (!file_exists($FromImgPath)) { 107 107 return array(0,"出力元画像が見つかりません。"); 108 108 } … … 118 118 $tmp_w = $size[0] / $MW; 119 119 120 if ($MH != 0) {120 if ($MH != 0) { 121 121 $tmp_h = $size[1] / $MH; 122 122 } 123 123 124 if ($tmp_w > 1 || $tmp_h > 1) {125 if ($MH == 0) {126 if ($tmp_w > 1) {124 if ($tmp_w > 1 || $tmp_h > 1) { 125 if ($MH == 0) { 126 if ($tmp_w > 1) { 127 127 $re_size[0] = $MW; 128 128 $re_size[1] = $size[1] * $MW / $size[0]; 129 129 } 130 130 } else { 131 if ($tmp_w > $tmp_h) {131 if ($tmp_w > $tmp_h) { 132 132 $re_size[0] = $MW; 133 133 $re_size[1] = $size[1] * $MW / $size[0]; … … 146 146 $ImgNew = imagecreatetruecolor($re_size[0],$re_size[1]); 147 147 148 switch ($size[2]) {148 switch ($size[2]) { 149 149 case "1": //gif形式 150 if ($tmp_w <= 1 && $tmp_h <= 1) {150 if ($tmp_w <= 1 && $tmp_h <= 1) { 151 151 if ($newFileName) { 152 152 $ToFile = $newFileName; 153 } elseif 153 } elseif ($ext) { 154 154 $ToFile .= "." . $ext; 155 155 } else {
Note: See TracChangeset
for help on using the changeset viewer.