<% $bb=162; /* Bildbreite */ $bh=93; /* Bildhöhe */ $zh=16; /* Zeilehhöhe */ ### $fonts="/fonts"; $fonts="/srv/www/vhosts/dlpfan.org/httpdocs/fonts"; $fh=12; /* Zeichensatzgröße */ function LoadPNG($imgname) { $im = @imagecreatefromPNG($imgname); /* Attempt to open */ if ($im == "") { /* See if it failed */ $im = ImageCreate(162,93); /* Create a blank image */ $bgc = ImageColorAllocate($im,255,255,255); $tc = ImageColorAllocate($im,0,0,0); ImageFilledRectangle($im,0,0,150,30,$bgc); ImageString($im,1,5,5,"Error loading $imgname",$tc); /* Output an errmsg */ } return $im; } Header( "Content-type: image/PNG"); $bild = LoadPNG("steinbody.png"); $dkgrey = ImageColorAllocate($bild,140,140,140); $dark = ImageColorAllocate($bild, 15,15, 15); $red = ImageColorAllocate($bild, 204, 102, 102); $black=ImageColorAllocate($bild, 0, 0, 0); $text[1]=rawurldecode($z1); $text[2]=rawurldecode($z2); $text[3]=rawurldecode($z3); $text[4]=rawurldecode($z4); $text[5]=rawurldecode($z5); for ($zeile = 1; $zeile <= 5; $zeile++): $box=ImageTTFBBox($fh, 0, "$fonts/arlrdbd.ttf", "$text[$zeile]"); $breite=$box[2]-$box[0]; $hoehe=$box[1]-$box[7]; ImageTTFText($bild, $fh, 0, ($bb/2)-($breite/2), ($bh-5*$zh)/2+$zeile*$zh, $dark, "$fonts/arlrdbd.ttf", "$text[$zeile]"); ImageTTFText($bild, $fh, 0, ($bb/2)-($breite/2)+1, ($bh-5*$zh)/2+$zeile*$zh+1, $red, "$fonts/arlrdbd.ttf", "$text[$zeile]"); endfor; ImagePNG($bild); ImageDestroy($bild); %>