"The image <name> cannot be displayed because it contains errors" when using pchart Render method
Posted
by christophe-milard
on Stack Overflow
See other posts from Stack Overflow
or by christophe-milard
Published on 2010-04-04T10:38:46Z
Indexed on
2010/04/04
10:43 UTC
Read the original article
Hit count: 548
Hi,
I am trying to use the pchart package (over php) to build (and directly display) graphs/charts. At this time, I am just trying to run their provided example (Example1.php), where I just have replaced the final:
$Test->Render("example1.png");
by
$Test->Stroke();
But When I do this, 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)
I have read that there is (was?) an issue with mozilla/Firefox browsers regarding images being required twice and the REFER URL, but when I browse at the pchart home page, I can use their "sanboxes" and get the result of my tests directly displayed on my browser (http://pchart.sourceforge.net/demo.php). ... So their must be a way (or a nice work around) to send the generated graphs directely to the browser successfuly.
If your answer is to generate the image (i.e. use Render) and then send it afterwards, please but accurate on how to do this (how do I destroy the generated files automaticaly, permissions...)
I am new to this, sorry advance if it's obvious...;-)
© Stack Overflow or respective owner