TCanvas::Print to stdout


is it possible to Print a Canvas to standard output.

I would like to create a python(pyroot)-cgi script creating an image (png) of a canvas. I would like to avoid temporary files or pipes on a webserver.



see TCanvas::Print to print a canvas in various formats

c1->Print("c1.gif"); etc same with ps,pdf,jpf,
Just in case you do not know, instead of running an unsecure cgi-script on a web server, you better access your ROOT files via http

TFile *file = TFile::Open("http>//xxx.yy.zz/myfile.root"); and proceed as if the file was local (TBrowser, scripts, etc)


Hi, use … ge:FromPad]
and then … mageBuffer

Regards. Valeriy

@rene: The problem is different. I do not have a root file. The images should be created directly from a query from a database. So I cannot circumvent the scripts.

@Valeriy: I am not sure how this converts to pyroot. The solution I found is giving /dev/fd/1 as filename. This is linux-specific, but should do for the moment.

Thank you for your hints!