Re: text color in image

From: Date: Mon, 03 Feb 2003 19:21:17 +0000
Subject: Re: text color in image
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134165@lists.php.net to get a copy of this message
The first ImageColorAllocate(0 function always sets the background color . So add one more call to ImageColorAllocate() to set the background color before line $tx_color = ImageColorAllocate($png,255,255,255); and then the text will be as you set in $tx_color HTH -R'twick ----- Original Message ----- From: "Brian V Bonini" <b-bonini@cox.net> To: "PHP Lists" <php-general@lists.php.net> Sent: Monday, February 03, 2003 1:42 PM Subject: [PHP] text color in image > Any idea why this would NOT create white text? > > $png = ImageCreatefrompng("images/menu0.png"); > $tx_color = ImageColorAllocate($png,255,255,255); > imagettftext($png,12,0,25,16,$tx_color,$font,$text); > > > There IS white (255,255,255) in the source png's palette, I don't know > weather that makes a difference or not. > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#134165) next »