[TASK] Remove unused code in GraphicsFunctions 90/50790/2
authorStefan Neufeind <typo3.neufeind@speedpartner.de>
Mon, 28 Nov 2016 10:23:38 +0000 (11:23 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 29 Nov 2016 20:15:50 +0000 (21:15 +0100)
$this->cmds['jpg'] gets set but is overwritten again a few
lines below.

Resolves: #78815
Releases: master
Change-Id: I9136b055e4eb3927249d8eb97486f36ad3a8976c
Reviewed-on: https://review.typo3.org/50790
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php

index ad972a0..d82d05c 100644 (file)
@@ -361,7 +361,6 @@ class GraphicalFunctions
         }
         // Setting default JPG parameters:
         $this->jpegQuality = MathUtility::forceIntegerInRange($gfxConf['jpg_quality'], 10, 100, 75);
-        $this->cmds['jpg'] = ($this->cmds['jpeg'] = '-colorspace ' . $this->colorspace . ' -sharpen 50 -quality ' . $this->jpegQuality);
         $this->addFrameSelection = (bool)$gfxConf['processor_allowFrameSelection'];
         if ($gfxConf['gdlib_png']) {
             $this->gifExtension = 'png';
@@ -372,14 +371,14 @@ class GraphicalFunctions
         // Effects in Imagemagick 5+ tends to render very slowly!!
         // - therefore must be disabled in order not to perform sharpen, blurring and such.
         $this->NO_IM_EFFECTS = 1;
-        $this->cmds['jpg'] = ($this->cmds['jpeg'] = '-colorspace ' . $this->colorspace . ' -quality ' . $this->jpegQuality);
+        $this->cmds['jpg'] = $this->cmds['jpeg'] = '-colorspace ' . $this->colorspace . ' -quality ' . $this->jpegQuality;
 
         // ... but if 'processor_effects' is set, enable effects
         if ($gfxConf['processor_effects']) {
             $this->NO_IM_EFFECTS = 0;
             $this->V5_EFFECTS = 1;
             if ($gfxConf['processor_effects'] > 0) {
-                $this->cmds['jpg'] = ($this->cmds['jpeg'] = '-colorspace ' . $this->colorspace . ' -quality ' . (int)$gfxConf['jpg_quality'] . $this->v5_sharpen(10));
+                $this->cmds['jpg'] = $this->cmds['jpeg'] = '-colorspace ' . $this->colorspace . ' -quality ' . (int)$gfxConf['jpg_quality'] . $this->v5_sharpen(10);
             }
         }
         // Secures that images are not scaled up.