“The image <name> cannot be displayed, it contains errors
I am trying to use the pchart package (over php) to build graphs/charts. At this time, I am just trying to run their provided example , where I just have replaced the final:
Code:
include("class/pData.class.php");
include("class/pDraw.class.php");
include("class/pImage.class.php");
$MyData = new pData();
$MyData->addPoints(array(VOID,3,4,3,5));
$myPicture= new pImage(700,230,$MyData);
$myPicture->setGraphArea(60,40,670,190);
$myPicture->setFontProperties(array("FontName"=>"fonts/Forgotte.ttf","FontSize"=>11));
$myPicture->drawScale();
$myPicture->drawSplineChart();
$myPicture->Stroke();
// $myPicture->Render("toto.png");
?>
With Render, I have a pictures with the graph but I can't diplay it on the web and when I try with Stroke, I get:" The image cannot be displayed because it contains errors" on the browser. If I leave the original $Test->Render(...) the generated image is OK. (but not sent)
If your answer is to generate the image and then send it afterwards, please but accurate on how to do this.
I am new to this, sorry advance if it's obvious...