Mailinglisten-Archive |
Hallo Ekkard,
Friday, July 12, 2002, 8:36:12 PM, schriebst du:
EG> <?
EG> Header("Content-Type: image/png");
EG> $im = ImageCreateFrompng('bild.png');
EG> $str = "Hello World";
EG> $font = "/home/gerlach/web/buzo/times.ttf";
EG> $bbox = imagettfbbox(40,0,$font, $str);
EG> $black = ImageColorAllocate($im,128,128,128);
EG> $start_x = ImageSX($im)/2 - (($bbox[0] + $bbox[2] + $bbox[4] + $bbox[6]) / 4);
EG> $start_y = ImageSY($im)/2 - (($bbox[1] + $bbox[3] + $bbox[5] + $bbox[7]) / 4);
EG> $white = ImageColorAllocate($im,255,255,255);
EG> $red = ImageColorAllocate($im,255,0,0);
EG> ImageLine($im,0,0,200,200,$red);
EG> $gray = ImageColorAllocate($im,196,196,196);
EG> ImageTTFText($im, 40, 0, $start_x+3, $start_y-3, $black, $font, $str);
EG> ImageTTFText($im, 40, 0, $start_x,$start_y, $gray, $font, $str);
EG> Imagepng($im);
EG> ImageDestroy($im);
?>>
EG> Die Fehler sind immer so viele und so merkwürdig, daß ich
EG> damit nicht anfangen möchte.
Du nicht, aber wir vielleicht, also halte sie nicht zurück.
--
Mit freundlichen Gruessen,
Jens mailto:j.kohl_(at)_style-id.de
php::bar PHP Wiki - Listenarchive