[BUGFIX] Thumbnail placeholder: image-not-rendered is unreadable
author7elix <felix-source@phorax.com>
Sat, 13 Aug 2011 20:54:41 +0000 (22:54 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 18 Aug 2011 21:31:42 +0000 (23:31 +0200)
If a thumbnail can not be created (im/gm mis-configuration or
inability to convert image format), a placeholder is rendered.
This placeholder contains text with further details.
This text is not readable, with white text on yellow background.
This patch changes: Black text on White background.

Change-Id: I3fa52b620a758caa0c864105203b314783319692
Resolves: #28962
Releases: 4.6
Reviewed-on: http://review.typo3.org/4308
Reviewed-by: Christopher
Tested-by: Christopher
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
t3lib/thumbs.php

index 7445d96..0192eee 100644 (file)
@@ -287,23 +287,23 @@ class SC_t3lib_thumbs {
                        $im = imagecreatefromgif(PATH_typo3 . 'gfx/notfound_thumb.gif');
                }
                        // Sets background color and print color.
-               $white = imageColorAllocate($im, 0, 0, 0);
-               $black = imageColorAllocate($im, 255, 255, 0);
+               $white = imageColorAllocate($im, 255, 255, 255);
+               $black = imageColorAllocate($im, 0, 0, 0);
 
                        // Prints the text strings with the build-in font functions of GD
                $x=0;
                $font=0;
                if ($l1) {
-                       imagefilledrectangle($im, $x, 9, 56, 16, $black);
-                       imageString($im,$font,$x,9,$l1,$white);
+                       imagefilledrectangle($im, $x, 9, 56, 16, $white);
+                       imageString($im, $font, $x, 9, $l1, $black);
                }
                if ($l2) {
-                       imagefilledrectangle($im, $x, 19, 56, 26, $black);
-                       imageString($im,$font,$x,19,$l2,$white);
+                       imagefilledrectangle($im, $x, 19, 56, 26, $white);
+                       imageString($im, $font, $x, 19, $l2, $black);
                }
                if ($l3) {
-                       imagefilledrectangle($im, $x, 29, 56, 36, $black);
-                       imageString($im,$font,$x,29,substr($l3,-14),$white);
+                       imagefilledrectangle($im, $x, 29, 56, 36, $white);
+                       imageString($im, $font, $x, 29, substr($l3, -14), $black);
                }
 
                        // Outputting the image stream and exit