Thanks Richard, I changed from using <img src=graphit2.php> to <a href=graphit2.php>graph</a> and now get my graph, on a page of its own, without any error messages. Works just fine, or will, when I change how it gets its data. However, I do want to have the graph display on a page with other information so I'm back to wanting to use some sort of image tag. Any suggestions? Hugh ----- Original Message ----- From: "Richard Lynch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 05, 2002 9:59 PM Subject: [PHP] Re: png image doesn't show
> >Hello all, > > > >I have been trying to modify the working of one of my pages which prints a > >png graph. What I had was an included file named "graphit.php" which > >creates a png file. I used the function > >imagepng($image,'temp.png') to create an image and then used <img > >src=temp.png> to have the image printed on the page. This worked well > >enough when only one user (me) was using the page, but I want more. In > >reading the imagepng() info in the manual, it states that I can output the > >raw image stream to the browser by leaving off the file name option. I've > >done this, but get nada! How should this be done? > >One of the notes (and it's in German) implies that I can call "graphit.php" > >using something like > > > ><img src=graphit.php> to get the image output. Unfortunately, I get > >nothing except the red X indicating a missing image. > > > >Any and all help is greatly appreciated. > > Tips: > > 1. Change graphit.php to have the header("Content-type: image/png") line at > the *END* of the script, right before you do imagepng($image) > > 2. Surf directly to graphit.php, and not the page with <IMG SRC=graphit.php> > in it. > > At this point, you'll probably find some PHP error messages from graphit.php > -- They don't look anything like a PNG image, so the browser can't display > them :-) > > > > -- > Like Music? http://l-i-e.com/artists.htm > > > -- > 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