php-windows | 2001042
Date: 04/17/01
- Next message: Sean: "[PHP-WIN] Xitami Config"
- Previous message: RJ: "[PHP-WIN] hello"
- Next in thread: Ignatius Teo: "RE: [PHP-WIN] [Apache/1.3.19 (Win32) PHP/4.0.5RC1] gd"
- Reply: Ignatius Teo: "RE: [PHP-WIN] [Apache/1.3.19 (Win32) PHP/4.0.5RC1] gd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I downloaded and installed the php package including a lot of extensions
like pdf and gd from www.mm4.de.
I read the following article
(http://www.phpbuilder.com/columns/rasmus19990124.php3) and tried the
code (s. below). It did not work. I get an empty gif image and I do not
understand what I have missed. I did the following:
- I copy all extensions in the c:\winnt\system32 directory
- I modified the php.ini file and only set following extensions:
php_gd_gif.dll (without php_gd.dll because I got error messages telling
that some functions was twice loaded), php_pdf.dll (for pdf, works
wunderfull)
- I put ARIAL.TTF in a web subdirectory: fonts
I would be very grateful if someone could help me.
christian
------------------------------ code -------------------------------
Header("Content-type: image/gif");
$font = "fonts/ARIAL.TTF";
echo imageloadfont($font);
if(!isset($s)) $s=11;
$size = imagettfbbox($s,0,"$font",$text);
$dx = abs($size[2]-$size[0]);
$dy = abs($size[5]-$size[3]);
$xpad=9;
$ypad=9;
$im = imagecreate($dx+$xpad,$dy+$ypad);
$blue = ImageColorAllocate($im, 0x2c,0x6D,0xAF);
$black = ImageColorAllocate($im, 0,0,0);
$white = ImageColorAllocate($im, 255,255,255);
ImageRectangle($im,0,0,$dx+$xpad-1,$dy+$ypad-1,$black);
ImageRectangle($im,0,0,$dx+$xpad,$dy+$ypad,$white);
ImageTTFText($im, $s, 0, (int)($xpad/2)+1, $dy+(int)($ypad/2), $black,
"$font", $text);
ImageTTFText($im, $s, 0, (int)($xpad/2), $dy+(int)($ypad/2)-1, $white,
"$font", $text);
ImageGif($im);
ImageDestroy($im);
------------------------------ code -------------------------------
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe <email protected> For additional commands, e-mail: php-windows-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sean: "[PHP-WIN] Xitami Config"
- Previous message: RJ: "[PHP-WIN] hello"
- Next in thread: Ignatius Teo: "RE: [PHP-WIN] [Apache/1.3.19 (Win32) PHP/4.0.5RC1] gd"
- Reply: Ignatius Teo: "RE: [PHP-WIN] [Apache/1.3.19 (Win32) PHP/4.0.5RC1] gd"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

