From b30cab5f1c46b3d6b279d62a63e971194d9d75de Mon Sep 17 00:00:00 2001 From: FabrizioC Date: Thu, 14 Aug 2014 15:37:04 +0200 Subject: [PATCH] Fixed image dimension after rotation --- src/PHPThumb/GD.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PHPThumb/GD.php b/src/PHPThumb/GD.php index 350bf19..ff01b85 100644 --- a/src/PHPThumb/GD.php +++ b/src/PHPThumb/GD.php @@ -776,8 +776,8 @@ public function rotateImageNDegrees($degrees) $this->workingImage = imagerotate($this->oldImage, $degrees, 0); - $newWidth = $this->currentDimensions['height']; - $newHeight = $this->currentDimensions['width']; + $newWidth = imagesx($this->workingImage); + $newHeight = imagesy($this->workingImage); $this->oldImage = $this->workingImage; $this->currentDimensions['width'] = $newWidth; $this->currentDimensions['height'] = $newHeight;