| @@ 1707-1728 (lines=22) @@ | ||
| 1704 | return $this->setError(elFinder::ERROR_UNSUPPORT_TYPE); |
|
| 1705 | } |
|
| 1706 | ||
| 1707 | switch($mode) { |
|
| 1708 | ||
| 1709 | case 'propresize': |
|
| 1710 | $result = $this->imgResize($path, $width, $height, true, true); |
|
| 1711 | break; |
|
| 1712 | ||
| 1713 | case 'crop': |
|
| 1714 | $result = $this->imgCrop($path, $width, $height, $x, $y); |
|
| 1715 | break; |
|
| 1716 | ||
| 1717 | case 'fitsquare': |
|
| 1718 | $result = $this->imgSquareFit($path, $width, $height, 'center', 'middle', ($bg ? $bg : $this->options['tmbBgColor'])); |
|
| 1719 | break; |
|
| 1720 | ||
| 1721 | case 'rotate': |
|
| 1722 | $result = $this->imgRotate($path, $degree, ($bg ? $bg : $this->options['tmbBgColor'])); |
|
| 1723 | break; |
|
| 1724 | ||
| 1725 | default: |
|
| 1726 | $result = $this->imgResize($path, $width, $height, false, true); |
|
| 1727 | break; |
|
| 1728 | } |
|
| 1729 | ||
| 1730 | if ($result) { |
|
| 1731 | $this->rmTmb($file); |
|
| @@ 1377-1398 (lines=22) @@ | ||
| 1374 | return $this->setError(elFinder::ERROR_UNSUPPORT_TYPE); |
|
| 1375 | } |
|
| 1376 | ||
| 1377 | switch($mode) { |
|
| 1378 | ||
| 1379 | case 'propresize': |
|
| 1380 | $result = $this->imgResize($local_path, $width, $height, true, true); |
|
| 1381 | break; |
|
| 1382 | ||
| 1383 | case 'crop': |
|
| 1384 | $result = $this->imgCrop($local_path, $width, $height, $x, $y); |
|
| 1385 | break; |
|
| 1386 | ||
| 1387 | case 'fitsquare': |
|
| 1388 | $result = $this->imgSquareFit($local_path, $width, $height, 'center', 'middle', ($bg ? $bg : $this->options['tmbBgColor'])); |
|
| 1389 | break; |
|
| 1390 | ||
| 1391 | case 'rotate': |
|
| 1392 | $result = $this->imgRotate($local_path, $degree, ($bg ? $bg : $this->options['tmbBgColor'])); |
|
| 1393 | break; |
|
| 1394 | ||
| 1395 | default: |
|
| 1396 | $result = $this->imgResize($local_path, $width, $height, false, true); |
|
| 1397 | break; |
|
| 1398 | } |
|
| 1399 | ||
| 1400 | if ($result) { |
|
| 1401 | ||