Mailinglisten-Archive |
>ich will hier nen Img erzeugen mit nem ALPHA Kanal.
>Es soll ne Schrift auf nen tranzpartenten Hintergrund erzeugt werden.
>HowTo (do)??
Suchst du so etwas?:
alpha.php:
<?php
header("Content-Type: image/gif");
$width = imagefontheight(5) * strlen($string);
$height = imagefontwidth(5) * 2;
$id = imagecreate($width,$height);
$black = imagecolorallocate($id, 0, 0, 0);
$white = imagecolorallocate($id, 255, 255, 255);
$trans = imagecolortransparent($id, $white);
imagefill($id, 0,0, $white);
imagestring($id, 5, 0, 0, $string, $black);
imagegif($id);
imagedestroy($id);
?>
Aufruf wäre dann:
<img src="alpha.php?string=Text">
bye
Daniel
php::bar PHP Wiki - Listenarchive