From:             [EMAIL PROTECTED]
Operating system: Linux 2.x
PHP version:      4.2.3
PHP Bug Type:     GD related
Bug description:  ImageTTFText & implode(" ", "$argv")

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 bug report at http://bugs.php.net/?id=20129&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20129&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20129&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20129&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20129&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20129&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20129&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20129&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20129&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20129&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20129&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20129&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20129&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20129&r=isapi

Reply via email to