ID:               35808
 User updated by:  pm5884 at email dot si
 Reported By:      pm5884 at email dot si
 Status:           Bogus
 Bug Type:         GD related
 Operating System: WinXP
 PHP Version:      4.4.1
 Assigned To:      pajoye
 New Comment:

Thank you for your previous help, i must admit that  i don't have many
experience with image and font manipulation.

With your help i have managed to make a Black&white image but the
result is still not god enough.
I must write characters to a small image and in get a cut down
characters (http://users.volja.net/pm5884/34.png and 32.png--please
zoom in). 
Can i setup the imagettftext function so that i get better results?
Or is it a bug of antializing?


Previous Comments:
------------------------------------------------------------------------

[2005-12-26 18:10:17] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Disable antialiasing if you want only 2 colors (bgd+fgd):
ImageTtfText($image ,50 ,0 ,23 ,23 , -$text_color, $ttf_font, $text);





------------------------------------------------------------------------

[2005-12-26 17:55:05] pm5884 at email dot si

Description:
------------
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???


Reproduce code:
---------------
<?
$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);
ImagePNG($image,"./file.png");
ImageDestroy($image);
?>

Expected result:
----------------
BLACK & WHITE image

Actual result:
--------------
16 clor image


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=35808&edit=1

Reply via email to