Re: No luck creating dynamic images

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks everyone for the help. I got it working now. Turns out at least part of the problem was invisible characters from the cut & past example code I found on the php site.

Ken

On Nov 1, 2004, at 3:48 PM, Robert Sossomon wrote:

Works fine for me, though the image needs to be lengthened some to get the whole text in it.

Check your server settings...

Robert

Ken Tozier is quoted as saying on 11/1/2004 2:51 PM:
<snip>
Enable FULL error reporting.
I tried this with error_reporting(E_ALL); and ran the script in multiple browsers no errors reported.
Also ran phpinfo(); (as suggested by Jay Blanchard) which worked without problem. The settings under GD were all enabled for the common image types.
Anybody see any glaring errors in the following?
Here's the html:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<body bgcolor="#ffffff">
<img src="dynamic_tabs.php">
</body>
</html>
And here's the php:
<?php
header("Content-type: image/png");
$im = imagecreate(100, 50)
or die("Cannot Initialize new GD image stream");
$back_color = imagecolorallocate($im, 255, 255, 255);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>

-- Robert Sossomon, Business and Technology Application Technician 4-H Youth Development Department 200 Ricks Hall, Campus Box 7606 N.C. State University Raleigh NC 27695-7606 Phone: 919/515-8474 Fax: 919/515-7812 robert_sossomon@xxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux