From 2267c99a71b93776e9bbbc5ee39102e96ecd1553 Mon Sep 17 00:00:00 2001 From: Richard Brown Date: Wed, 11 Nov 2015 15:19:44 +0000 Subject: [PATCH] Fix Resize/keepFrame with matching dimension The logic in Resize() prevents keeping the frame if one of the original dimensions matches the frame dimension. This patch keeps the frame if either of the dimensions are different. --- src/app/code/community/Varien/Image/Adapter/Imagemagic.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/code/community/Varien/Image/Adapter/Imagemagic.php b/src/app/code/community/Varien/Image/Adapter/Imagemagic.php index a5c6ce2..dc60d93 100644 --- a/src/app/code/community/Varien/Image/Adapter/Imagemagic.php +++ b/src/app/code/community/Varien/Image/Adapter/Imagemagic.php @@ -141,8 +141,10 @@ public function resize($frameWidth = null, $frameHeight = null) // Fill desired canvas if ($this->keepFrame() === TRUE - && $frameWidth != $origWidth - && $frameHeight != $origHeight + && ( + $frameWidth != $origWidth + || $frameHeight != $origHeight + ) ) { $composite = new Imagick(); $color = $this->_backgroundColor;