note 14791 added to function.imagettftext.php

From: Date: Wed, 15 Aug 2001 02:46:39 +0000
Subject: note 14791 added to function.imagettftext.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16739@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,...); http://www.php.net/manual/en/function.imagettftext.php

« previous php.notes (#16739) next »