PHP 4.0 Bug #7769 Updated: antialias does not work properly in imagettftext
| From: | sniper@php.net | Date: | Mon, 13 Nov 2000 12:35:08 +0000 |
| Subject: | PHP 4.0 Bug #7769 Updated: antialias does not work properly in imagettftext | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-37893@lists.php.net to get a copy of this message | ||
ID: 7769
Updated by: sniper
Reported By: defiant@telnet.hu
Status: Closed
Bug Type: GD related
Assigned To: markonen
Comments:
'fixed'?
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-11-12 20:20:05] markonen@php.net
You compiled with the
--enable-freetype-4bit-antialias-hack configure option,
right? That option is bogus, and has been removed
from 4.0.4. You should be able to use PHP with
freetype2 anyway, but only with 2-bit (4-shade)
antialiasing.
---------------------------------------------------------------------------
[2000-11-12 16:08:08] defiant@telnet.hu
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
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7769