From 08c8e6f8fcf6c2d9a54a537af48b79dd78d23e5d Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 11 May 2013 10:59:57 +0200 Subject: [PATCH] Fixes GDImageAdapter::resize/clip Currently, only the $image property is updated which isn't sufficient since width and height are also changed by these methods, thus they also need to be updated --- .../files/lib/system/image/adapter/GDImageAdapter.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php b/wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php index ce5b08bb50..4b6b77a393 100644 --- a/wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php +++ b/wcfsetup/install/files/lib/system/image/adapter/GDImageAdapter.class.php @@ -151,7 +151,8 @@ class GDImageAdapter implements IImageAdapter { imageCopy($image, $this->image, 0, 0, $originX, $originY, $width, $height); imageSaveAlpha($image, true); - $this->image = $image; + // update image resource to also update width and height + $this->load($image, $this->type); } /** @@ -164,7 +165,8 @@ class GDImageAdapter implements IImageAdapter { imageCopyResampled($image, $this->image, $targetX, $targetY, $originX, $originY, $targetWidth, $targetHeight, $originWidth, $originHeight); imageSaveAlpha($image, true); - $this->image = $image; + // update image resource to also update width and height + $this->load($image, $this->type); } /** -- 2.20.1