From 90b96e1fc419a9c7fdb661909747cd9b92d43fd0 Mon Sep 17 00:00:00 2001 From: Jonathon Menz Date: Tue, 28 Jul 2015 14:28:33 -0700 Subject: [PATCH] Remove redundant force_resample logic --- model/Image.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/model/Image.php b/model/Image.php index 7edcdc6eb..ef4ce7595 100644 --- a/model/Image.php +++ b/model/Image.php @@ -291,9 +291,6 @@ class Image extends File implements Flushable { * @return Image */ public function FitMax($width, $height) { - // Temporary $force_resample support for 3.x, to be removed in 4.0 - if (Config::inst()->get('Image', 'force_resample') && $this->getWidth() <= $width && $this->getHeight() <= $height) return $this->Fit($this->getWidth(),$this->getHeight()); - return $this->getWidth() > $width || $this->getHeight() > $height ? $this->Fit($width,$height) : $this; @@ -340,9 +337,6 @@ class Image extends File implements Flushable { // Prevent divide by zero on missing/blank file if(!$this->getWidth() || !$this->getHeight()) return null; - // Temporary $force_resample support for 3.x, to be removed in 4.0 - if (Config::inst()->get('Image', 'force_resample') && $this->isSize($width, $height)) return $this->Fill($width, $height); - // Is the image already the correct size? if ($this->isSize($width, $height)) return $this; @@ -414,9 +408,6 @@ class Image extends File implements Flushable { * @return Image */ public function ScaleMaxWidth($width) { - // Temporary $force_resample support for 3.x, to be removed in 4.0 - if (Config::inst()->get('Image', 'force_resample') && $this->getWidth() <= $width) return $this->ScaleWidth($this->getWidth()); - return $this->getWidth() > $width ? $this->ScaleWidth($width) : $this; @@ -454,9 +445,6 @@ class Image extends File implements Flushable { * @return Image */ public function ScaleMaxHeight($height) { - // Temporary $force_resample support for 3.x, to be removed in 4.0 - if (Config::inst()->get('Image', 'force_resample') && $this->getHeight() <= $height) return $this->ScaleHeight($this->getHeight()); - return $this->getHeight() > $height ? $this->ScaleHeight($height) : $this; @@ -471,9 +459,6 @@ class Image extends File implements Flushable { * @return Image */ public function CropWidth($width) { - // Temporary $force_resample support for 3.x, to be removed in 4.0 - if (Config::inst()->get('Image', 'force_resample') && $this->getWidth() <= $width) return $this->Fill($this->getWidth(), $this->getHeight()); - return $this->getWidth() > $width ? $this->Fill($width, $this->getHeight()) : $this; @@ -488,9 +473,6 @@ class Image extends File implements Flushable { * @return Image */ public function CropHeight($height) { - // Temporary $force_resample support for 3.x, to be removed in 4.0 - if (Config::inst()->get('Image', 'force_resample') && $this->getHeight() <= $height) return $this->Fill($this->getWidth(), $this->getHeight()); - return $this->getHeight() > $height ? $this->Fill($this->getWidth(), $height) : $this;