RE: [PHP-WIN] [Apache/1.3.19 (Win32) PHP/4.0.5RC1] gd

From: Date: Tue, 17 Apr 2001 23:50:12 +0000
Subject: RE: [PHP-WIN] [Apache/1.3.19 (Win32) PHP/4.0.5RC1] gd
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-6806@lists.php.net to get a copy of this message
Try specifying the full path to the font file... Ignatius Project Manager, Internet Accounting Snail: Information Technology Directorate Southern Cross University PO Box 157, Lismore NSW 2480 Voice: +61 2 6620-3221 Fax : +61 2 6620-3033 Email:iteo@scu.edu.au > -----Original Message----- > From: Christian Ribeaud [mailto:christian.ribeaud@predict.ch] > Sent: Tuesday, 17 April 2001 18:18 > To: php-windows@lists.php.net > Subject: [PHP-WIN] [Apache/1.3.19 (Win32) PHP/4.0.5RC1] gd > > > 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@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.windows (#6806) next »