Date: 11/12/00
- Next message: Andi Gutmans: "Re: [PHP-DEV] Bug in 4.03pl1 multipart/form-data method (file uploads)"
- Previous message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #4 Updated: asdasd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: defiant <email protected>
Operating system: Debian Lin \"woody\"
PHP version: 4.0.3pl1
PHP Bug Type: GD related
Bug description: antialias does not work properly in imagettftext
Hi there!
The following script should produce a BLACK text over a red rectangle on a white background. It almost does that, except that the color of the text is GRAY.
header ("Content-type: image/png");
$im = ImageCreate (250, 40);
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$rect_color = ImageColorAllocate ($im, 255, 0, 0);
$text_color = ImageColorAllocate ($im, 0, 0, 0);
ImageFill($im, 0, 0, $background_color);
ImageFilledRectangle($im, 60, 5, 100, 35, $rect_color);
ImageTTFText ($im, 20, 0, 10, 20, $text_color, "/cda/ttf/ARIAL.TTF", "Testing... ");
ImagePng ($im);
If I turned off the antialiasing with
ImageTTFText ($im, 20, 0, 10, 20, 1*$text_color, "/cda/ttf/ARIAL.TTF", "Testing... ");
then the text color is black again (negative color index).
I do not know if it is a problem with GD or Freetype or PHP or the Debian package. A script like this worked for me fine before, but it does not right now.
Debian packages installed:
PHP-4.0.3pl1-2
libgd1-1.8.3-4
freetype2-1.3.1-1
Regards,
Tamas
-- Edit Bug report at: http://bugs.php.net/?id=7769&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Andi Gutmans: "Re: [PHP-DEV] Bug in 4.03pl1 multipart/form-data method (file uploads)"
- Previous message: sniper <email protected>: "[PHP-DEV] PHP 4.0 Bug #4 Updated: asdasd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

