I dont get any errors, doing a phpinfo(); shows GD installed. I use a html
with an <img> tag to call the php file that is supposed to generate the
image. Example code below is saved in a file called chart.php and use the
img src tag to call it. On the html page I just get a space as if the html
page could not find the image. Any help would be greatly appreciated.
<HTML>
<BODY>
<H1>RMAs Raised</H1>
<IMG SRC="test1.php" HEIGHT="250" WIDTH="480">
</BODY>
</HTML>
<?php
//-------------------- chart.php file
header ("Content-type: image/png");
$img_handle = ImageCreate (230, 20) or die ("Cannot Create image");
$back_color = ImageColorAllocate ($img_handle, 0, 10, 10);
$txt_color = ImageColorAllocate ($img_handle, 233, 114, 191);
ImageString ($img_handle, 31, 5, 5, "My first Program with GD",
$txt_color);
ImagePng ($img_handle);
?>
"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:i8********************************@4ax.com...
On Wed, 10 Nov 2004 21:18:24 -0000, "Tony Clarke" <cl*****@eircom.net>
wrote: I'm haveing some problems I'm trying to generate bar charts dynamically
bypulling data from an MS Access databasae using an ODBC connection and
thengenerating the bar charts, this is all on WinXP Pro by the way. I have
noproblems with getting the data out of the database and sorting it. I was
using this tutorial
http://www.phpbuilder.com/columns/wi...r20001218.php3 as a guidline
togenerating the images, but nothing seems to be working for me.
My problem is that I cannot generate any images using any of
theGD image functions. I have loaded the php_gd2.dll in the php.ini file and
Ican see that the dll is loaded when I do a phpinfo(); the probelm is that
none of the pages are generating any images.
I would be greatful if somebody would be able to assist.
Example code? What errors do you get? What happens when you try to view
the images? Have you sent the right content-type header? Are there PHP error
messages being produced (this corrupts the image)?