note 107237 added to function.imagecolortransparent
| From: | john at jbwalker dot com | Date: | Mon, 23 Jan 2012 20:42:51 +0000 |
| Subject: | note 107237 added to function.imagecolortransparent | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185718@lists.php.net to get a copy of this message | ||
A transparent background with text doesn't seem to work very well because of the antialiasing .
But I tried the following kluge and it turned out very well:
$im = imagecreatetruecolor(100,20);
$almostblack = imagecolorallocate($im,254,254,254);
imagefill($im,0,0,$almostblack);
$black = imagecolorallocate($im,0,0,0);
imagecolortransparent($im,$almostblack);
... set x and y..
imagettftext($im,8,0,$x,$y,$black,"calibri.ttf",$txt);
----
Server IP: 66.207.199.35
Probable Submitter: 174.7.25.37
----
Manual Page -- http://www.php.net/manual/en/function.imagecolortransparent.php
Edit -- https://master.php.net/note/edit/107237
Del: integrated -- https://master.php.net/note/delete/107237/integrated
Del: useless -- https://master.php.net/note/delete/107237/useless
Del: bad code -- https://master.php.net/note/delete/107237/bad+code
Del: spam -- https://master.php.net/note/delete/107237/spam
Del: non-english -- https://master.php.net/note/delete/107237/non-english
Del: in docs -- https://master.php.net/note/delete/107237/in+docs
Del: other reasons-- https://master.php.net/note/delete/107237
Reject -- https://master.php.net/note/reject/107237
Search -- https://master.php.net/manage/user-notes.php