[TYPO3-german] Probleme mit Gifbuilder, Bild mit Text

typo3 at hh-iservice.de typo3 at hh-iservice.de
Tue Aug 21 22:42:36 CEST 2007


Hallo Leute,

ich versuche per Gifbuilder aus einem vorhandenem Bild ein neues zu
generieren auf dem noch ein Text hinterlegt ist. Leider funktioniert dies
nicht ganz so wie ich es mir vorstelle und erhoffe mir einen Tip von Euch.

Ein Bild, Größe 640x480px, besitze ich als Grundlage was über das
Backend in meine Extension abgelegt wird. Normalerweise soll dieses dann im
Frontend nur mit einer Größe von 180x135px angezeigt werden und per Klick
vergrößert werden. Dies funktioniert auch soweit.

$conf['image']['file']='uploads/tx_availablereptiles/'.$fNID.'';
$conf['image']['file.']['width'] = '180';
$conf['image']['border'] = "1";
       
$click_conf['bodyTag'] = '<body bgcolor="white" leftmargin="0"
topmargin="0" marginwidth="0" marginheight="0">';
$click_conf['JSwindow'] = '1';
$click_conf['JSwindow.newWindow'] = '0';
$click_conf['JSwindow.expand'] = '0,0';
$click_conf['enable'] = '1';
       
$image .= $this->cObj->IMAGE($conf['image']);
$click_link =
$this->cObj->imageLinkWrap($image,$conf['image']['file'],$click_conf);

Nun möchte ich dies jedoch erweitern. Es soll bei Bedarf ein Text
(verkauft, reserviert) auf dem Bild erscheinen. Hierzu mache ich folgendes:

$conf['image']['file']='uploads/tx_availablereptiles/'.$fNID.'';
$conf['image']['file.']['width'] = '180';
$conf['image']['border'] = "1";

$img["file"] = 'GIFBUILDER';
$img['file.']["XY"] = '180,135';
$img['file.']["BorderColor"] = '#ffffff';

$img['file.']["5"] = 'IMAGE';
$img['file.']["5."]["file"] = 'uploads/tx_availablereptiles/'.$fNID.'';

$img['file.']["10"] = 'TEXT';
$img['file.']["10."]["offset"] = '10,20';
$img['file.']["10."]["text"] = 'Verkauft';
$img['file.']["10."]["nicetext"] = '1';
$img['file.']["10."]["fontColor"] = 'black';
$img['file.']["10."]["fontFile"] = "fileadmin/fonts/arial.ttf";
$img['file.']["10."]["fontSize"] = '14';
       
$image .= $this->cObj->IMAGE($img);

$click_conf['bodyTag'] = '<body bgcolor="white" leftmargin="0"
topmargin="0" marginwidth="0" marginheight="0">';
$click_conf['JSwindow'] = '1';
$click_conf['JSwindow.newWindow'] = '0';
$click_conf['JSwindow.expand'] = '0,0';
$click_conf['enable'] = '1';

$click_link =
$this->cObj->imageLinkWrap($image,$conf['image']['file'],$click_conf);

Der Text erscheint Ordnungsgemäß auf dem Bild nur ist das Ausgangsbild
nicht auf die gewünschte Größe von 180x135px verkleinert. Es wird mir
ein neues Bild erstellt und ein Teilausschnitt in der Größe von 180x135px
dargestellt.

Wie kann ich dieses Problem denn lösen? Hat jemand einen Hinweis für
micht?

Grüße Marko



More information about the TYPO3-german mailing list