Re: [PHP] PHP Warning: imagettftext() expects parameter 2 to be double

2005-12-08 Thread Jochem Maas
Jeffrey Sambells wrote: You've got 83px in you XML file for the fontsize. the 'px' is messing it up change it to just 83 in the XML file or cast the value to (float) which will extract the 83 and remove the px: well spotted Jeffery; James didn't I say to var_dump() the vars you create inside

Re: [PHP] PHP Warning: imagettftext() expects parameter 2 to be double

2005-12-07 Thread Jeffrey Sambells
You've got 83px in you XML file for the fontsize. the 'px' is messing it up change it to just 83 in the XML file or cast the value to (float) which will extract the 83 and remove the px: foreach ($xml->textblock as $text) { $fontsize=(float)$text->fontsize;

Re: [PHP] PHP Warning: imagettftext() expects parameter 2 to be double

2005-12-07 Thread James
Title: Re: [PHP] PHP Warning:  imagettftext() expects parameter 2 to be double Hi, Thank you for getting back to me, your the first. The array works fine – I have tested it using var_dump(). Attached are the two files – xml.test – this holds the array of the text blocks which is being parsed

Re: [PHP] PHP Warning: imagettftext() expects parameter 2 to be double

2005-12-07 Thread Jochem Maas
James wrote: Hi there, I have been using the GD functions from PHP5.0 on Mac OS X. I have a simple script that creates a PNG image with text on the image using fonts using FreeType 2. I am trying to use the imagettftext() function within a foreach loop ­ but I get the following error: PHP War

[PHP] PHP Warning: imagettftext() expects parameter 2 to be double

2005-12-05 Thread James
Hi there, I have been using the GD functions from PHP5.0 on Mac OS X. I have a simple script that creates a PNG image with text on the image using fonts using FreeType 2. I am trying to use the imagettftext() function within a foreach loop ­ but I get the following error: PHP Warning: imagettf