I took some code I had written to generate graphs and created a class. I have the class in a file called 'graph.php' which I include from another file. When I call the functions from my main PHP file and use ImagePng($image,"scratch/out.png"), the file is created. But when I try to reference the PHP file from within a "img src" tag, I get a blank screen.
Right before my class calls the imagecreate function I use the Header command to print an image header.
Basically if everything is in one file it works, if I output to a file it works, but it does not display an image when referenced as an image.
Any ideas?