[TYPO3-v4] TransparentBackground funktioniert mit 4.4.4 nicht mehr

Florian Schaeffer florian.schaeffer at mercoline.de
Mon Dec 13 08:09:01 CET 2010


Hello Werner,

> I have converted to Typo3 4.4.4 and now the Gifbuilder option
> TransparentBackground is not working anymore. Have tried with
> ImageMagick 4.2.9 and 6.5.5 w/o any result.
> Anything that I have missed during the installation?

There was an change that prevents having transparent images using 
transparentBackground = 1 and niceText = 1.

This change is also documented ...

I just stumbled across a similar problem and solved it (at least for 
images with a white4 background) using

transparentBackground = 1
transparentColor = #ffff

and then setting niceText = 1 and antiAlias = 0

and patching the gifbuilder-class to behave like in the upcoming 4.5 - 
release according to http://bugs.typo3.org/view.php?id=15184

Using

--- typo3/sysext/cms/tslib/class.tslib_gifbuilder.php	2010-10-06 
10:40:06.000000000 +0200
+++ typo3/sysext/cms/tslib/class.tslib_gifbuilder.php	2010-11-02 
16:40:51.000000000 +0100
@@ -440,7 +440,7 @@

  		if ($this->setup['transparentBackground'])	{
  				// Auto transparent background is set
-			$Bcolor = ImageColorExact($this->im, $BGcols[0],$BGcols[1],$BGcols[2]);
+			$Bcolor = ImageColorClosest($this->im, 
$BGcols[0],$BGcols[1],$BGcols[2]);
  			imagecolortransparent($this->im, $Bcolor);
  		} elseif (is_array($this->setup['transparentColor_array']))	{
  				// Multiple transparent colors are set. This is done via the trick 
that all transparent colors get converted to one color and then this one 
gets set as transparent as png/gif can just have one transparent color.

solved this issue for me ...

HTH
Florian


More information about the TYPO3-project-v4 mailing list