note 60085 rejected from function.imagettftext by mazzanet

From: Date: Sun, 25 Dec 2005 23:05:03 +0000
Subject: note 60085 rejected from function.imagettftext by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-100693@lists.php.net to get a copy of this message
Note Submitter: pm5884 at email dot si ---- 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); ?>

« previous php.notes (#100693) next »