diff options
author | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2019-02-11 23:59:43 +0100 |
---|---|---|
committer | Klaus Weidenbach <Klaus.Weidenbach@gmx.net> | 2019-02-14 22:06:42 +0100 |
commit | b9df4c99cf9fcd1b16757309b4206ad084376aa2 (patch) | |
tree | 14cf94cc9c2c7f617ecc1b470d5ff5662dd38fb6 /Zotlabs/Photo/PhotoImagick.php | |
parent | e6dadb215e9e08491ae57ab851960a0973d3f704 (diff) | |
download | volse-hubzilla-b9df4c99cf9fcd1b16757309b4206ad084376aa2.tar.gz volse-hubzilla-b9df4c99cf9fcd1b16757309b4206ad084376aa2.tar.bz2 volse-hubzilla-b9df4c99cf9fcd1b16757309b4206ad084376aa2.zip |
Remove duplicate code in PhotoDriver classes.
cropImage is just a special case of cropImageRect, no need to
duplicate all the code.
Diffstat (limited to 'Zotlabs/Photo/PhotoImagick.php')
-rw-r--r-- | Zotlabs/Photo/PhotoImagick.php | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Zotlabs/Photo/PhotoImagick.php b/Zotlabs/Photo/PhotoImagick.php index 373bac40f..a7026e8ca 100644 --- a/Zotlabs/Photo/PhotoImagick.php +++ b/Zotlabs/Photo/PhotoImagick.php @@ -169,24 +169,6 @@ class PhotoImagick extends PhotoDriver { $this->setDimensions(); // Shouldn't really be necessary } - public function cropImage($max,$x,$y,$w,$h) { - if(!$this->is_valid()) - return false; - - $this->image->setFirstIterator(); - do { - $this->image->cropImage($w, $h, $x, $y); - /* - * We need to remove the canvas, - * or the image is not resized to the crop: - * http://php.net/manual/en/imagick.cropimage.php#97232 - */ - $this->image->setImagePage(0, 0, 0, 0); - } while($this->image->nextImage()); - - $this->doScaleImage($max, $max); - } - public function cropImageRect($maxx, $maxy, $x, $y, $w, $h) { if(! $this->is_valid()) return false; |