note 14791 deleted from function.imagettftext by jimw

From: Date: Mon, 17 Dec 2001 22:37:56 +0000
Subject: note 14791 deleted from function.imagettftext by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23045@lists.php.net to get a copy of this message
I've found that imagecolorexact(), imagecolorallocate() etc. etc. fail in true color mode (it can't find exact colors for some reason). Which leads to a default color being used in this function. do this to check: echo imagecolorallocate(255,255,255); if you get -1 as your output, it failed to find/allocate a color. Use imagecolorclosest() instead: $clr = imagecolorclosest(255,255,255); imagettftext(...,$clr,...);

« previous php.notes (#23045) next »