[BUGFIX] Fix refactoring regression in imagecopyresized
authorLorenz <lorenz.ulrich@visol.ch>
Tue, 12 Jun 2012 12:15:24 +0000 (14:15 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 14 Jun 2012 21:55:56 +0000 (23:55 +0200)
t3lib_stdGraphic::imagecopyresized was refactored to make it
unit-testable in #26660. This change had a regression. When GIFBUILDER
is used with a mask, the mask is copied to the mask instead of the
source image.

Change-Id: Ice2a1cf86f36aed7b429fccd28563782e65966a4
Releases: 4.7, 6.0
Fixes: #36947
Reviewed-on: http://review.typo3.org/11984
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Florian Zimmermann
Tested-by: Florian Zimmermann
Reviewed-by: Andreas Bouche
Tested-by: Andreas Bouche
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/class.t3lib_stdgraphic.php

index bc0ad87..d09186c 100644 (file)
@@ -469,7 +469,7 @@ class t3lib_stdGraphic {
                                // Make true color image
                        $tmpImg = imagecreatetruecolor(imagesx($dstImg), imagesy($dstImg));
                                // Copy the source image onto that
-                       imagecopyresized($tmpImg, $srcImg, 0, 0, 0, 0, imagesx($dstImg), imagesy($dstImg), imagesx($dstImg), imagesy($dstImg));
+                       imagecopyresized($tmpImg, $dstImg, 0, 0, 0, 0, imagesx($dstImg), imagesy($dstImg), imagesx($dstImg), imagesy($dstImg));
                                // Then copy the source image onto that (the actual operation!)
                        imagecopyresized($tmpImg, $srcImg, $dstX, $dstY, $srcX, $srcY, $dstWidth, $dstHeight, $srcWidth, $srcHeight);
                                // Set the destination image