@@ -297,37 +297,37 @@ discard block |
||
297 | 297 | |
298 | 298 | // 向き補正 |
299 | 299 | if(isset($exif_datas['Orientation'])){ |
300 | - $orientation = $exif_datas['Orientation']; |
|
301 | - if($image){ |
|
302 | - // 未定義 |
|
303 | - if($orientation == 0){ |
|
304 | - // 通常 |
|
305 | - }else if($orientation == 1){ |
|
306 | - // 左右反転 |
|
307 | - }else if($orientation == 2){ |
|
300 | + $orientation = $exif_datas['Orientation']; |
|
301 | + if($image){ |
|
302 | + // 未定義 |
|
303 | + if($orientation == 0){ |
|
304 | + // 通常 |
|
305 | + }else if($orientation == 1){ |
|
306 | + // 左右反転 |
|
307 | + }else if($orientation == 2){ |
|
308 | 308 | $image = $this->imageFlop($image); |
309 | - // 180°回転 |
|
310 | - }else if($orientation == 3){ |
|
309 | + // 180°回転 |
|
310 | + }else if($orientation == 3){ |
|
311 | 311 | $image = $this->imageRotate($image,180, 0); |
312 | - // 上下反転 |
|
313 | - }else if($orientation == 4){ |
|
312 | + // 上下反転 |
|
313 | + }else if($orientation == 4){ |
|
314 | 314 | $image = $this->imageFlip($image); |
315 | - // 反時計回りに90°回転 上下反転 |
|
316 | - }else if($orientation == 5){ |
|
315 | + // 反時計回りに90°回転 上下反転 |
|
316 | + }else if($orientation == 5){ |
|
317 | 317 | $image = $this->imageRotate($image,90, 0); |
318 | 318 | $image = $this->imageFlip($image); |
319 | - // 時計回りに90°回転 |
|
320 | - }else if($orientation == 6){ |
|
319 | + // 時計回りに90°回転 |
|
320 | + }else if($orientation == 6){ |
|
321 | 321 | $image = $this->imageRotate($image,-90, 0); |
322 | - // 時計回りに90°回転 上下反転 |
|
323 | - }else if($orientation == 7){ |
|
322 | + // 時計回りに90°回転 上下反転 |
|
323 | + }else if($orientation == 7){ |
|
324 | 324 | $image = $this->imageRotate($image,-90, 0); |
325 | 325 | $image = $this->imageFlip($image); |
326 | - // 反時計回りに90°回転 |
|
327 | - }else if($orientation == 8){ |
|
326 | + // 反時計回りに90°回転 |
|
327 | + }else if($orientation == 8){ |
|
328 | 328 | $image = $this->imageRotate($image,90, 0); |
329 | - } |
|
330 | - } |
|
329 | + } |
|
330 | + } |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | switch ($imagetype) { |
@@ -407,7 +407,7 @@ discard block |
||
407 | 407 | */ |
408 | 408 | private function imageRotate($image, $angle, $bgd_color) |
409 | 409 | { |
410 | - return imagerotate($image, $angle, $bgd_color, 0); |
|
410 | + return imagerotate($image, $angle, $bgd_color, 0); |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | } |