note 60085 added to function.imagettftext
| From: | pm5884 at email dot si | Date: | Sun, 25 Dec 2005 22:30:51 +0000 |
| Subject: | note 60085 added to function.imagettftext | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100691@lists.php.net to get a copy of this message | ||
A interesting problem with imagettftest function, it can't output 2 color (black & white -
1 BitsPerPixel) images. It always switches to at least 16 color's (4 BitsPerPixel). I need 2
color output, how can I get it???
<?
$image = ImageCreate(100,30);
$background_color = ImageColorAllocate($image, 255, 255, 255);
$text_color = ImageColorAllocate($image, 0, 0, 0);
$ttf_font = './font/Arial.ttf';
$text = 'test';
echo imagecolorstotal($image)."<br>";
ImageTtfText($image ,10 ,0 ,23 ,23 ,$text_color, $ttf_font, $text);
echo imagecolorstotal($image);
// kadar eli pisati v datoteko
ImagePNG($image,"./file.png");
ImageDestroy($image);
?>
----
Manual Page -- http://www.php.net/manual/en/function.imagettftext.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60085
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60085&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60085&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60085&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60085&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60085&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60085&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60085&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60085&report=yes
Search -- http://master.php.net/manage/user-notes.php