[BUGFIX] Install Tool image tests: black background after scaling 16/31816/5
authorSusanne Moog <typo3@susannemoog.de>
Fri, 25 Jul 2014 15:05:48 +0000 (17:05 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 25 Jul 2014 17:55:48 +0000 (19:55 +0200)
Transparent turns black unless you specify a different color
because transparent = unset color = 0 = black. We should fix this
by adding the "-opaque white -background white -flatten"
parameters for the convert action done
by the install tool.

Change-Id: I5dd5c41852a33159752702b68ce0a297b33cf569
Releases: 6.3, 6.2
Fixes: #60570
Reviewed-on: http://review.typo3.org/31816
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/install/Classes/Controller/Action/Tool/TestSetup.php

index b762b53..316a776 100644 (file)
@@ -332,7 +332,7 @@ class TestSetup extends Action\AbstractAction {
                $imageProcessor->IM_commands = array();
                $inputFile = $this->imageBasePath . 'TestInput/Transparent.gif';
                $imageProcessor->imageMagickConvert_forceFileNameBody = uniqid('scale-jpg');
-               $imResult = $imageProcessor->imageMagickConvert($inputFile, 'jpg', '150', '', '', '', array(), TRUE);
+               $imResult = $imageProcessor->imageMagickConvert($inputFile, 'jpg', '150', '', '-opaque white -background white -flatten', '', array(), TRUE);
                if ($imResult !== NULL) {
                        $testResults['gif-to-jpg']['title'] = 'gif to jpg';
                        $testResults['gif-to-jpg']['outputFile'] = $imResult[3];