ID: 20129
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: GD related
Operating System: Linux 2.x
PHP Version: 4.2.3
New Comment:
ohhh, god...
Previous Comments:
------------------------------------------------------------------------
[2002-10-27 20:48:08] [EMAIL PROTECTED]
I cannot use implode with the ImageTTFText function.
The following code does not work, it returns a broken image:
<?php
Header("Content-type: image/png");
//$string = "Test";
$string = implode(" ", "$argv");
$string = urldecode($string);
$im = imageCreateFromPng("header_img2.png");
$white = ImageColorAllocate($im, 167, 194, 206);
$px = (imagesx($im)-7.5*strlen($string))/2;
ImageTTFText($im, 30, 0, $px, 42, $white,
"/usr/local/apache/htdocs/ttf/ARTBRUSH.TTF", "$string");
ImagePng($im);
ImageDestroy($im);
?>
If I comment out the implode line and set $string then it works great.
I use implode with other code for creating other images but not with
ImageTTFText.
Thanks!
- Justin
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20129&edit=1