[TYPO3-content-rendering] Gifbuilder - Issue with transparent PNGs when "transparentColor" is set (maybe even more)

Franz Koch typo3 at fx-graefix.de
Wed May 17 20:13:40 CEST 2006


Hi list,

I have a problem with rendering a Gifbuilder-Object under certian conditions. Here the scenario. I need an image that looks like this:

|-------------------------------\--|
| some text                      \T| T = this part is transparent
|---------------------------------\|

Therefor I create a box, put the text on it, place a half transparent image over the right side and define the color of not transparent part (which else) as transparent color for the gifbuilder.

The image looks like this:

|-\---| T = transparent
|  \BB| B = black
| T \B|
|____\|


Everything worked fine on my dev-system (which is capable of gif-creation). After uploading to the production server I had to find out that the transparent part of the overlayed image is getting rendered white.
I can reproduce this behaviour on my dev-system when I set "gdlib_png=1" (so that gifbuilder "gifs" get rendered as png instead).

Here is my TS:
-----------------------
# graphical headlines for block-elements
temp.gfxheader = CASE
temp.gfxheader {
  key.field = section_frame

  setCurrent {
    field = header
    htmlSpecialChars = 1
  }

  default  = COA
  default {
	50 = IMG_RESOURCE
	50 {
		alttext.current = 1
		#params = align="left"
	
		file = GIFBUILDER
		file {
		  XY = [20.w]+42 ,22
		  maxWidth = 600
		  backColor = {$color.default}
		  transparentColor = black
		  reduceColors = 16

		  20 = TEXT 
		  20 { 
			text.current = 1
			#text.crop = 
			text.case = lower
			fontSize = 18
			fontFile = {$template.basepath}{$template.userpath}fonts/LTe50344.ttf
			fontColor = #FFFFFF
			offset = 8,18
			#niceText = 1 
		  }
	  
		  30 = IMAGE
		  30 {
			file = {$template.basepath}{$template.userpath}images/mask_headline.png
			align = r
			offset = [30.w]-22,0
		   }
		 }
	}
	50.stdWrap.wrap = <span class="title" style="background-image: url('|')">
	
	70 = TEXT
		70 {
		field = subheader
		required = 1
		case = lower
		wrap = <em>|</em>
		if.isTrue.field = header_link
	}
	
	80 = TEXT
	80.value = </span>
  }
}

-----------------------

I noticed that when I remove "transparentColor = black" that the transparent area doesn't get white anymore, but unfortunately the resulting image is not transparent either. Any ideas?

-- 
Kind regards,
Franz Koch



More information about the TYPO3-project-content-rendering mailing list