Fixed bug #13406: thumbs.php: Thumbnails for images with transparent background look...
authorBenni Mack <benni.mack@typo3.org>
Sun, 21 Feb 2010 19:45:36 +0000 (19:45 +0000)
committerBenni Mack <benni.mack@typo3.org>
Sun, 21 Feb 2010 19:45:36 +0000 (19:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6950 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/thumbs.php

index 519ffd8..b1abf8b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-21  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #13406: thumbs.php: Thumbnails for images with transparent background look ugly (Thanks to Andreas Wolf and Steffen Ritter)
+
 2010-02-21  Steffen Kamper  <info@sk-typo3.de>
 
        * Fixed bug #13444: Filemounts are unsorted
index 9d72ac3..cf1b5f0 100644 (file)
@@ -227,16 +227,7 @@ class SC_t3lib_thumbs {
                        if ($TYPO3_CONF_VARS['GFX']['im'])      {
                                        // If thumbnail does not exist, we generate it
                                if (!file_exists($this->output))        {
-/*                                     if (strstr($this->input,' ') || strstr($this->output,' '))      {
-                                               $this->errorGif('Spaces in','filepath',basename($this->input));
-                                       }
-*/                                             // 16 colors for small (56) thumbs, 64 for bigger and all for jpegs
-                                       if ($outext=='jpg')     {
-                                               $colors = '';
-                                       } else {
-                                               $colors = ($sizeMax>56)?'-colors 64':'-colors 16';
-                                       }
-                                       $parameters = '-sample '.$this->size.' '.$colors.' '.$this->wrapFileName($this->input).'[0] '.$this->wrapFileName($this->output);
+                                       $parameters = '-sample ' . $this->size . ' ' . $this->wrapFileName($this->input) . '[0] ' . $this->wrapFileName($this->output);
                                        $cmd = t3lib_div::imageMagickCommand('convert', $parameters);
                                        exec($cmd);
                                        if (!file_exists($this->output))        {