| @@ 2852-2867 (lines=16) @@ | ||
| 2849 | $result = false; |
|
| 2850 | ||
| 2851 | switch ($this->imgLib) { |
|
| 2852 | case 'imagick': |
|
| 2853 | ||
| 2854 | try { |
|
| 2855 | $img = new imagick($path); |
|
| 2856 | } catch (Exception $e) { |
|
| 2857 | ||
| 2858 | return false; |
|
| 2859 | } |
|
| 2860 | ||
| 2861 | $img->cropImage($width, $height, $x, $y); |
|
| 2862 | ||
| 2863 | $result = $img->writeImage($path); |
|
| 2864 | ||
| 2865 | return $result ? $path : false; |
|
| 2866 | ||
| 2867 | break; |
|
| 2868 | ||
| 2869 | case 'gd': |
|
| 2870 | $img = self::gdImageCreate($path,$s['mime']); |
|
| @@ 2988-2999 (lines=12) @@ | ||
| 2985 | $result = false; |
|
| 2986 | ||
| 2987 | switch ($this->imgLib) { |
|
| 2988 | case 'imagick': |
|
| 2989 | try { |
|
| 2990 | $img = new imagick($path); |
|
| 2991 | } catch (Exception $e) { |
|
| 2992 | return false; |
|
| 2993 | } |
|
| 2994 | ||
| 2995 | $img->rotateImage(new ImagickPixel($bgcolor), $degree); |
|
| 2996 | $result = $img->writeImage($path); |
|
| 2997 | return $result ? $path : false; |
|
| 2998 | ||
| 2999 | break; |
|
| 3000 | ||
| 3001 | case 'gd': |
|
| 3002 | $img = self::gdImageCreate($path,$s['mime']); |
|