imagestring() not working

From: Date: Mon, 01 Nov 2004 14:04:00 +0000
Subject: imagestring() not working
Groups: php.general 
Request: Send a blank email to php-general+get-200827@lists.php.net to get a copy of this message
Hi all, I'm trying to create a little function that generates tabs dynamically and am having no luck with the imagestring() function. I checked out the documentation and even cut and pasted the example but it always chokes the browser when the page containing an imagestring() line is loaded. Anyone see what I'm doing wrong? Thanks Ken ----------------------------------------------------- Here's the script so far: <?php $font  = 1; $font_width = ImageFontWidth($font); $str_len = strlen($in_tab_title); $width = $font_width * $str_len; $height = ImageFontHeight($font); $image = imagecreate($width, $height); $inactive = ImageColorAllocate($image, 118, 102, 205); $poly = imagerectangle($image, 0, 0, $width, $height, $inactive); $over = ImageColorAllocate($image, 138, 122, 243); $active = ImageColorAllocate($image, 230, 179, 115); $text_color = ImageColorAllocate($image, 255, 0, 0); echo "<pre>"; var_dump($image); var_dump($inactive); var_dump($poly); var_dump($over); var_dump($active); var_dump($text_color); echo "</pre>"; // if I comment out the next line, the browser displays the above var_dumps // but when it's uncommented, the browser displays a blank screen imagestring ($image, 1, 0, 0,  "bobo", $text_color); // header("Content-type: image/png"); // imagepng($im); ?> And here's the return from gd_settings() array(11) { ["GD Version"]=> string(27) "bundled (2.0.15 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(true) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(false) ["JPG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) }

« previous php.general (#200827) next »