Created
January 10, 2014 20:32
-
-
Save MacDada/8362024 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| if (!class_exists('Imagick')) { | |
| class Imagick | |
| { | |
| const FILTER_LANCZOS = 1; | |
| private $path; | |
| public function __construct($path) | |
| { | |
| if (!is_file($path)) { | |
| throw new RuntimeException('File not found: '.$path); | |
| } | |
| $this->path = $path; | |
| } | |
| public function getImageWidth() | |
| { | |
| $size = getimagesize($this->path); | |
| return $size[0]; | |
| } | |
| public function getImageHeight() | |
| { | |
| $size = getimagesize($this->path); | |
| return $size[1]; | |
| } | |
| public function writeImage($path) | |
| { | |
| copy($this->path, $path); | |
| } | |
| public function cropImage() | |
| { | |
| } | |
| public function setImageCompressionQuality() | |
| { | |
| } | |
| public function resizeImage() | |
| { | |
| } | |
| public function compositeImage() | |
| { | |
| } | |
| public function getImageCompose() | |
| { | |
| } | |
| public function destroy() | |
| { | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment