Handling image output/files

Hi everyone.

I’m wondering if there is a way to output an image to the stdout (as binary) instead of a file with pre-determined extensions; something that would work like ./my_root_prog_that_outputs_a_png > myrootplot.png

Any suggestion?

No, there is nothing like that… but what do you need this ?

Aparently there is :slight_smile:

If c is a TCanvas* you want to print, this does the trick:

c->GetPainter()->SaveImage(c, “/dev/stdout”, TImage::kPng);;