note 87155 deleted from function.imagettftext by danbrown
| From: | danbrown@php.net | Date: | Fri, 21 Nov 2008 20:27:29 +0000 |
| Subject: | note 87155 deleted from function.imagettftext by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-146811@lists.php.net to get a copy of this message | ||
Note Submitter: roland dot hentschel at t-online dot de
Reason: integrated
----
2 more modifications (makeImageF):
1.) choose type of output (GIF or PNG) :
=========================
$type = $_REQUEST['type'] ? $_REQUEST['type'] : "png";
switch($type) {
case "gif" :
header("Content-type: image/gif");
imageGIF(imagettfpostext($text, $font,
$fsize, $pos, $rgb),"wm.gif", 9); break;
case "png" :
header("Content-type: image/png");
imagePNG(imagettfpostext($text, $font,
$fsize, $pos, $rgb),"wm.png", 9); break;
}
2.) add transparency (just before "return $im") :
===============================
if ($_REQUEST["trans"]) {
$bg_color = ImageColorAt($im,1,1);
ImageColorTransparent($im, $bg_color);
}