note 107807 added to function.imagecolortransparent

From: Date: Wed, 07 Mar 2012 06:27:16 +0000
Subject: note 107807 added to function.imagecolortransparent
Groups: php.notes 
Request: Send a blank email to php-notes+get-186514@lists.php.net to get a copy of this message
Thanks john, this really help me. While creating a Text Image by setting a color - "Image shows black background marks behind the TEXT ". After using your method, It gave me a proper Image with Proper Color. /*********************************************/ 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: 69.147.83.197 Probable Submitter: 180.148.55.59 (proxied: 180.148.55.59) ---- Manual Page -- http://www.php.net/manual/en/function.imagecolortransparent.php Edit -- https://master.php.net/note/edit/107807 Del: integrated -- https://master.php.net/note/delete/107807/integrated Del: useless -- https://master.php.net/note/delete/107807/useless Del: bad code -- https://master.php.net/note/delete/107807/bad+code Del: spam -- https://master.php.net/note/delete/107807/spam Del: non-english -- https://master.php.net/note/delete/107807/non-english Del: in docs -- https://master.php.net/note/delete/107807/in+docs Del: other reasons-- https://master.php.net/note/delete/107807 Reject -- https://master.php.net/note/reject/107807 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186514) next »