Zum Inhalt springen

Grafik aus Bild und Text erstellen

Erstellt am 11. Juli 2005 · 1 Antwort · letzte Antwort am 11. Juli 2005

Tags: Bilder, Frage

todo ·

Hallo zusammen,

ich versuche gerade mit einer Extension grafische Headlines zu ersellten. Leider weiß ich nicht wie ich den Text innerhalb der Extension auf mein Bild rendern kann.

Bis jetzt habe ich folgendes:

function teaserImg($text) {
		$imageConfig = $this->conf['images.'];
		$imageConfig['file'] = "fileadmin/template_rz/main/images/bg_radiowissen.gif";
		$imageConfig['XY'] = "224,44";
		$imageConfig['text'] = $text;
		$imageConfig['20.']["fontFile"] = "fileadmin/fonts/verdana.ttf";
		
		return $this->cObj->IMAGE($imageConfig); 
	}

Wenn ich mich in TS befinden würde, würde ich jetzt fortfahren mit:

10 = TEXT
10.fontFile = "fileadmin/fonts/verdana.ttf";
10.text = = $text;
.....

Ich befinde mich aber nicht im TS.

Ich habe leider keine Ahnung wie ich da weiterkommen soll.

Vielleicht kann mir jemand einen Rat geben.

Vielen Dank im voraus

Ciao
ToDo

todo ·

Nach mein bisschen probieren habe ich das Problem selbst gelöst:

function teaserImg($text) {
	$img["file"] = 'GIFBUILDER';
	$img['file.']["XY"] = '224,44';
	$img['file.']["5"] = 'IMAGE';
	$img['file.']["5."]["file"] = /fileadmin/template_rz/main/images/mein_hintergrund.gif';

	$img['file.']["10"] = 'TEXT';
	$img['file.']["10."]["offset"] = '10,35';
	$img['file.']["10."]["text"] = strtoupper($text);
	$img['file.']["10."]["nicetext"] = '1';
	$img['file.']["10."]["fontColor"] = 'white';
	$img['file.']["10."]["fontFile"] = "fileadmin/fonts/helvnbe1.ttf";
	$img['file.']["10."]["fontSize"] = '12';
		
	return $this->cObj->IMAGE($img); 
}