note 107807 deleted from function.imagecolortransparent by danbrown

From: Date: Thu, 10 May 2012 18:26:17 +0000
Subject: note 107807 deleted from function.imagecolortransparent by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-187754@lists.php.net to get a copy of this message
Note Submitter: Jalpa Bhavsar ---- 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); /*********************************************/

« previous php.notes (#187754) next »