Einzelnen Beitrag anzeigen
  #6  
Alt 05.10.06, 14:23
Nejah Nejah ist offline
Forum Newbie
 
Registriert seit: 06.09.06
Alter: 22
Beiträge: 46

Hallo!

Inzwischen bin ich auf eine -meine Erachtens etwas weniger elegante- Lösung gekommen:

Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
temp.text = IMAGE
temp.text {

file = GIFBUILDER
file {
XY        = [10.w],[10.h]
backColor = #000000

10 = TEXT
10 {
offset    = 0,[10.h]
text      = Here's the text
fontSize  = 30
fontFile  = fileadmin/arial.ttf
fontColor = #000000
}

20 = SCALE
20 {
width     = [10.w]*70/100
height    = [10.h]
}
}

mask < temp.text.file
mask {
backColor    = #000000
10.fontColor = #FFFFFF
}
}



10 = IMAGE
10.file = GIFBUILDER
10.file {
10 = IMAGE
10 {
        # ---Konfigurationen für ein Hintergrundbild---
}

20 < temp.text
}

In diesem Beispiel wird zunächst ein Bild (temp.text) mit einem Text auf transparentem Grund erzeugt.
Die Transparenz wird durch eine Maske erreicht.
Mittels SCALE wird die gewünscht Breite erreicht (hier: 70 % der Ursprungsbreite).
Am Schluss wird temp.text noch in das endgültige Bildobjekt hineinkopiert.

Nachteil: Da ich hier mit einer Maske arbeite, wird der Text ein wenig fetter, als er eigentlich sein sollte. Leider haben transparentColor und transparentBackground bei mir nicht funktioniert :sad:
Wer eine elegantere Lösung hat: Immer her damit
Mit Zitat antworten