From e98bd5da417ca153b3bf275210ed391f3c94960d Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Mon, 18 Sep 2023 17:19:32 +0100 Subject: [PATCH] phpdoc --- lib/Varien/Image/Adapter/Gd2.php | 16 ++++------------ lib/Varien/Image/Adapter/Imagick.php | 5 +++++ 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/Varien/Image/Adapter/Gd2.php b/lib/Varien/Image/Adapter/Gd2.php index 18423d22dca..a9822c3e410 100644 --- a/lib/Varien/Image/Adapter/Gd2.php +++ b/lib/Varien/Image/Adapter/Gd2.php @@ -412,20 +412,12 @@ public function resize($frameWidth = null, $frameHeight = null) $this->_resized = true; } + /** + * @param $angle float + * @return void + */ public function rotate($angle) { - /* - $isAlpha = false; - $backgroundColor = $this->_getTransparency($this->_imageHandler, $this->_fileType, $isAlpha); - list($r, $g, $b) = $this->_backgroundColor; - if ($isAlpha) { - $backgroundColor = imagecolorallocatealpha($this->_imageHandler, 0, 0, 0, 127); - } - elseif (false === $backgroundColor) { - $backgroundColor = imagecolorallocate($this->_imageHandler, $r, $g, $b); - } - $this->_imageHandler = imagerotate($this->_imageHandler, $angle, $backgroundColor); - //*/ $this->_imageHandler = imagerotate($this->_imageHandler, $angle, $this->imageBackgroundColor); $this->refreshImageDimensions(); } diff --git a/lib/Varien/Image/Adapter/Imagick.php b/lib/Varien/Image/Adapter/Imagick.php index 58f3a38a8c7..ff1bdcefb2f 100644 --- a/lib/Varien/Image/Adapter/Imagick.php +++ b/lib/Varien/Image/Adapter/Imagick.php @@ -207,6 +207,11 @@ public function resize($frameWidth = null, $frameHeight = null) $this->_resized = true; } + /** + * @param $angle float + * @return void + * @throws ImagickException + */ public function rotate($angle) { $this->_imageHandler->rotateImage($this->imageBackgroundColor, $angle);